Open Image Links within Posts in a Lightbox

If your posts contain links to images, those images will open on their own within the browser window. This lets people view your images, but it doesn't look as nice as opening images in a popup lightbox. Fortunately, it is possible to convert images within Divi Theme posts to open in a lightbox.

To do so, add the following jQuery to your site:

Now any image links in your posts will open in a lightbox (whether your posts use the Divi Builder or not).

If you don't want to mess with jQuery, I've added an option to Divi Booster to do it for you. You'll find the option on the Divi Booster settings page at "Posts > Open linked images in a lightbox". It is available in Divi Booster 2.6.7 onwards.

Want get more out of Divi?

Hundreds of new features for Divi
in one easy-to-use plugin


  1. Anton

    Thanks! It worked!

  2. Eugene Maxey

    Hi. Just purchased the Divi Booster. Is there a video on how to use it once the plugin is installed? Not sure what to do.


    • dan

      Hi Eugene, I don't have a video on how to use the plugin, I'm afraid. But once the plugin is installed, from your WordPress dashboard go to "Divi > Divi Booster". That will take you to the Divi Booster settings screen which contains most of the settings added by Divi Booster, organized by the section of Divi they act on. To enable a feature, simply check the box beside it, fill in any details it asks for, and save the settings using the button at the bottom of the settings page. To learn more about a particular feature, click the blue (i) icon beside it on the right hand side of the settings screen.

      To enable the open image links in a light box feature, for example, go to the "Posts" section of the settings page, click the heading bar to expand the section if it isn't already and then check the box beside: "Open linked images in a lightbox". Save the settings and your links should now open in a lightbox.

      I hope that helps, but let me know if you still aren't sure what to do. Thanks!

  3. Michael

    Nevermind. Must have been a cacheing issue, as it's now working.

    • dan

      Great! I'm glad you got it working, Michael.

  4. Michael

    The new Divi Booster option doesn't seem to work. It still just links to the image in a new window when the image is set to link to the Media File, rather than opening it in a lightbox.


Submit a Comment

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