Divi 5’s Portfolio, Filterable Portfolio and Post Carousel modules link every item to its project page, and none of them has a lightbox option. Divi Doctor adds an Open In Lightbox switch that opens the item’s featured image in the lightbox Divi uses for its Gallery module. This page covers how to switch it on, what visitors see, how it keeps the page fast, and the limits.
Switch it on
- Go to Divi Doctor → Features.
- Under Portfolio modules, find the Open portfolio images in a lightbox card and click Enable.
The card’s Divi lightbox row shows available when Divi 5’s lightbox files were found. If it shows Not found, portfolio links keep opening the project page.
Nothing changes on your pages yet. The option is off on every module until you switch it on there.
Post Carousel is the module Divi 4 called Fullwidth Portfolio. The card and Divi 5’s module list both call it Post Carousel.
Open a module’s images in the lightbox
- Open the page in the Visual Builder and open the settings of a Portfolio, Filterable Portfolio or Post Carousel module.
- In Content → Elements, switch on Open In Lightbox. It’s after the Show options.
- Save the page, and clear any page cache.
- Open the page logged out and click an item’s image.
The lightbox only works on the live page. In the builder, the module keeps Divi’s links.
| Option | What it does | Default |
|---|---|---|
| Open In Lightbox | Opens the item’s featured image in a lightbox when the image is clicked, instead of going to the project page. Visitors can move between the items of this module. | Off |
The option has one value for all screen sizes.
What visitors see
- Clicking an item’s image opens its featured image at full size, with the item’s title under it. The enlarged image gets the title as its alt text.
- When the module has more than one item, arrows and a counter such as 2 of 6 appear. The arrows, the left and right arrow keys and a swipe on a touch screen move between the items, and a click on the image shows the next one.
- The × button or the Esc key closes the lightbox.
- In a Filterable Portfolio, the lightbox only moves through the items the current filter shows.
- In a Post Carousel, the lightbox moves through all of the module’s items, not only the ones the carousel is showing. Divi shows the item link only while the image is hovered, so a click or tap anywhere on the image opens the lightbox.
- Items without a featured image keep opening their page and are left out of the lightbox.
The link itself still points to the project page. A Ctrl-click, Cmd-click, Shift-click or middle-click opens the project as usual, and so does a click in a browser without JavaScript. Keyboard users can tab to an item’s link and press Enter to open the lightbox.
How it works
On a module with Open In Lightbox on, Divi Doctor adds the address of each item’s full-size featured image to the item’s image link. A small script then opens that image in Divi’s own lightbox, with the options Divi uses for its Gallery module. Only the featured image of each item already on the page is used, and titles are shown as plain text.
To keep the page fast, Divi’s lightbox files aren’t loaded with the page. They load the first time a visitor points at, focuses or taps an item image. If the page already loads Divi’s lightbox, for example for a Gallery module, that copy is used instead. If the lightbox can’t load, the click goes to the project page, as it would without the feature. Pages without such a module get nothing extra.
Limits
- Divi 5 only.
- The lightbox shows the featured image only, not other images from the project.
- The builder doesn’t preview the lightbox. Check it on the live page.
- Clear any page cache after switching the option on.
- Turning the feature off, or deactivating Divi Doctor, brings back Divi’s links straight away. The option stays saved in your modules and is ignored.
Questions
How do I open Divi 5 portfolio images in a lightbox?
Switch on Open portfolio images in a lightbox in Divi Doctor → Features, under Portfolio modules. Then open a Portfolio, Filterable Portfolio or Post Carousel module and switch on Open In Lightbox in Content → Elements. Save the page and clear any page cache. Clicking an item’s image then opens its featured image in the lightbox Divi uses for its Gallery module, instead of the project page.
Does the Divi Filterable Portfolio lightbox follow the current filter?
Yes. In a Filterable Portfolio, the lightbox only moves through the items the current filter shows. When a module has more than one item, arrows and a counter such as 2 of 6 appear, and the arrow keys or a swipe move between the items. In a Post Carousel, the lightbox moves through all of the module’s items, not only the ones the carousel is showing.
Can the Divi portfolio lightbox show more than the featured image?
No. The lightbox shows the item’s featured image only, not other images from the project, with the item’s title under it. Items without a featured image keep opening their page and are left out of the lightbox. A Ctrl-click, Cmd-click, Shift-click or middle-click still opens the project page, because the link itself still points there.
Does the Divi portfolio lightbox slow down the page?
No. To keep the page fast, Divi’s lightbox files aren’t loaded with the page; they load the first time a visitor points at, focuses or taps an item image. If the page already loads Divi’s lightbox, for example for a Gallery module, that copy is used instead. Pages without a module using Open In Lightbox get nothing extra.
Why doesn’t the Divi portfolio lightbox work in the Visual Builder?
The lightbox only works on the live page; in the builder, the module keeps Divi’s links. Save the page, clear any page cache and open it logged out to check. If the feature card’s Divi lightbox row shows Not found instead of available, Divi 5’s lightbox files weren’t found and portfolio links keep opening the project page.
If the lightbox doesn’t open, see Features and bug fixes in the FAQ.