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. Michael

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

    • dan

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

  2. 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 *