Show Image Description on Image Module Lightbox

This post may contain referral links which may earn a commission for this site

The Divi Theme's image modules come with the option opening the image in a lightbox. That is, when you set the image module's "Image Settings > Content > Link > Open in Lightbox" option to "Yes", your users can click on your image it will be enlarged and displayed in the center of the screen. By default, there is not text displayed with the image, but if you want to show a description of the image below this enlarged "lightbox" view of the image, here's how.

Set the Alternative Text for the Image

In HTML the "alternative text" for an image is the text displayed when the image can't be shown (e.g. the user is using a screen reader, or the image file is missing). However, Divi repurposes the alternative text as a way to show a title / description below the image when opened in a lightbox.

You can set the alternative text for the image at "Image Settings > Advanced > Attributes > Image Alternative Text", like so:

Now when you click on the image, to open it in a lightbox you should see the text displayed, like so:

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

2 Comments

    • Anytime, Bill 😉

      Reply

Submit a Comment

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