How to Make a Divi Blurb Module Image Open in Lightbox

March 17, 2025

Written by Ally Nagle

Ally is the owner and lead web designer of Idolize Design, LLC - locally owned and operated in Wilmington, Delaware. She's been active in the digital design world since 2006 and has degrees in Business Management, Media Design and Life Coaching.

We’ll manually load a lightbox script that ensures the Blurb Module images open in a lightbox.


Step 1: Add a Custom CSS Class to the Blurb Module

  1. Edit the Blurb Module
    • Open the module settings.
    • Go to the Advanced tab.
    • In the CSS Class field, enter: blurb-lightbox
    • Save changes.

Step 2: Add the Magnific Popup Script

We need to load the lightbox script and apply it to the blurb images.

  1. Go to Divi > Theme Options > Integration.
  2. In the “Add code to the <head> of your blog” section, insert this:
<!-- Load Magnific Popup -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script>
  1. In the “Add code to the <body> section, insert this:
<script>
jQuery(document).ready(function($) {
$(".blurb-lightbox .et_pb_main_blurb_image img").each(function() {
var imgSrc = $(this).attr("src");
$(this).wrap('<a href="' + imgSrc + '" class="blurb-popup"></a>');
});

$(".blurb-popup").magnificPopup({
type: "image",
gallery: { enabled: true },
closeOnContentClick: true
});
});
</script>

Step 3: Clear Cache & Test

  • If you have caching plugins enabled, clear your cache.
  • Refresh your page and click the blurb image.
  • The image should now open in a lightbox with a close button and navigation.

Step 4: Increase the Lightbox Overlay z-index

Add this CSS to Divi > Theme Options > Custom CSS OR inside a Code Module on your page:

.mfp-bg, .mfp-wrap {
z-index: 999999 !important; /* Ensures the lightbox is on top */
}

.mfp-container {
z-index: 1000000 !important;
}

2 Comments

  1. Jackie J.

    Awesome, thank you! I’ve been searching for this FOREVER. Appreciate your post!

    Reply
    • Ally Nagle

      You’re welcome, glad I could help! 🙌

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

You Might Also Like…

Work With Us

&

Get a Quote

302.330.8857

Located in Garnet Valley, PA

Send us a message

Idolize Design, LLC © 2026 | All rights reserved.