You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple image blocks set to open in light box should connect to create cohesive carousel. #56310
Currently, if I have several full sized images within a post set to open in a lightbox, it's very tedious to view the next image. Each image in a post must be clicked or tapped, then closed in order for viewer to get to the next one. It's not a fluid experience for the viewer.
If I have multiple images in a post set to open in the lightbox, a viewer should be able to tap on one to open the lightbox, and then be able to fuildly navigate to each image within the lightbox, like a carousel.
What is your proposed solution?
Desktop: User should be able to use left or right arrow keys to navigate through all the images in the same lightbox
Mobile: User should be able to swipe left or right to easily browse all images in the lightbox
Example: In my post I have many images set to open in the lightbox. If I tap on the first image, the lightbox opens, but to view the others I have to close it and tap the other images to re-open the lightbox.
Good issue, would definitely agree that if we are going to have lightbox enabled in galleries, it should either be a nice gallery there as well, chevrons left and right plus arrow key navigation. Or, just be disabled. I could swear there was already an issue for this, but I didn't find one linked from #51132. CC: @michalczaplinski
Reacted by Jeff Golenski, jihaisse, annezazu, Robert Paulsen and Sascha Paukner
Just to clarify behavior, this seems desirable for multiple images within a gallery, but not necessarily desirable for all images in a post. E.g. if I have multiple galleries (which might be separated by paragraphs of text), I'd expect (or like the ability to configure) the lightbox to let someone flip through the images in a single gallery, but stop them when they get to the end of that gallery so they know to continue reading. This is how the baguetteBox.js lightbox plugin I've been using on my site operates.
Related: #37652 (this one isn't linked on #51132 yet, maybe that's the one @jasmussen was thinking of earlier? It probably got lost since it was opened long before the 6.4 lightbox was implemented.)
Another +1 here. A wee bit disappointed that there is no hint of this for 6.6. The single image lightbox works nicely... if gallery support is added, that would be a great thing. Thanks!
I wanted to reference #56587 as having mockups relevant to this issue, notably this one:
As far as a design for how this could look, at least the experience of it, IMO those designs can work.
As far as the block editor UI for it, I would recommend keeping things as simple as possible. Right now the way you set lightbox on individual images is in the link dialog:
Choose "expand on click". The motivation for this is that it's a click behavior, just like visiting a link is, and opening a lightbox is mutually exclusive to zooming.
It's honestly the same for galleries and gallery lightboxes, so would a good meaningful first step be to add "Expand on click", and the improved dropdown appearance (which features icons) to this dropdown?
It does open a question we have to answer eventually: what happens in a 5 image gallery if all but the third image is set to "expand on click"? My instinct: lightbox arrowkeys would navigate images 1 and 2, then you'd exit, and then you could again swap between 4 and 5, then exit. Of course not ideal, but nevertheless reflecting what you can do.
what happens in a 5 image gallery if all but the third image is set to "expand on click"? My instinct: lightbox arrowkeys would navigate images 1 and 2, then you'd exit, and then you could again swap between 4 and 5, then exit. Of course not ideal, but nevertheless reflecting what you can do.
Can't we remove/hide the "Expand on click" option of the Image block when the image is inside of a Gallery block, and add a global "Expand on click" option to the Gallery block itself?
@nekromoff I've got a free plugin that does this in the queue for approval that will hopefully get approved soon. The only feature is literally that it adds the option to make a gallery open in a lightbox with arrows to scroll between all gallery photos (in the lightbox).
I provide some related enhancement ideas for Gutenberg, e.g. allow to display images added to a carousel block as if working in a gallery on activating overlay. https://github.com/leotiger/wordpress-enhancements
Hello @jasmussen, I'm not really into development anymore, I'm working with Wordpress as I need the platform for a specific problem and one of the solutions is WP-based. After many years, decades I'm back using Wordpress. Back than I offered and maintained some plugins for WooCommerce in the WP universe. Right now I will release everything I'm doing to the public, and hopefully someone feels intrigued to push things further... there are some valid ideas, over the next days I will publish more stuff. Once I'm done with my integrations and things are working we can discuss what's good for WP itself and how to give continuity to the rest.
Finally Multisite was a bad layout decision for my needs, I switched back to single instance, the side effect, I wrote a trid based mu-plugin accompanied by its own language switcher, kind of a WPML for the poor... It's published now within the wordpress-enhancements mentioned above.
Hard stuff, being out of the business of doing computer stuff for nearly 10 years was a challenge... Today I submitted a plugin to wordpress.org... Hopefully it is worth attention... Lingua Forge it's called... Personally, I'm quite happy with it, but if it really makes its way depends on many other factors... Have a look at https://github.com/leotiger/lingua-forge
That said, I need a break, but I'm quite intrigued now with AI... and will have a look if I can contribute as long as it has a return for me... Some minor things I did to solve "personal" problems for my WP single instance may have value for the community... apart from the full-fledged plugin I wrote now based on former work dedicated mostly to be run on my own instance and abstracted into something that may be useful for many people and anger others offering the most basic services behind paywalls. Lingua Forge doesn't.
Activity
jeffgolenski commentedon Nov 20, 2023
Video recording https://github.com/WordPress/gutenberg/assets/214813/e9dae2fa-8130-4c6e-b01c-4a34242d7385
jasmussen commentedon Nov 20, 2023
Good issue, would definitely agree that if we are going to have lightbox enabled in galleries, it should either be a nice gallery there as well, chevrons left and right plus arrow key navigation. Or, just be disabled. I could swear there was already an issue for this, but I didn't find one linked from #51132. CC: @michalczaplinski
michalczaplinski commentedon Nov 20, 2023
I don't recall there being an issue for this yet, so thank you @jeffgolenski!
michalczaplinski commentedon Nov 21, 2023
I've linked this issue in Tracking issue: Image Lightbox #51132
bradhogan commentedon Dec 20, 2023
+1 on this - very common in all other platforms (webflow, sqs, etc.) would love to see this added soon. Thanks all.
jacobgkau commentedon Jan 29, 2024
Just to clarify behavior, this seems desirable for multiple images within a gallery, but not necessarily desirable for all images in a post. E.g. if I have multiple galleries (which might be separated by paragraphs of text), I'd expect (or like the ability to configure) the lightbox to let someone flip through the images in a single gallery, but stop them when they get to the end of that gallery so they know to continue reading. This is how the baguetteBox.js lightbox plugin I've been using on my site operates.
jacobgkau commentedon Feb 1, 2024
Related: #37652 (this one isn't linked on #51132 yet, maybe that's the one @jasmussen was thinking of earlier? It probably got lost since it was opened long before the 6.4 lightbox was implemented.)
veerap000 commentedon Feb 1, 2024
+1
aileenf commentedon May 15, 2024
Another +1 here. A wee bit disappointed that there is no hint of this for 6.6. The single image lightbox works nicely... if gallery support is added, that would be a great thing. Thanks!
jasmussen commentedon Jul 3, 2024
I wanted to reference #56587 as having mockups relevant to this issue, notably this one:
As far as a design for how this could look, at least the experience of it, IMO those designs can work.
As far as the block editor UI for it, I would recommend keeping things as simple as possible. Right now the way you set lightbox on individual images is in the link dialog:
Choose "expand on click". The motivation for this is that it's a click behavior, just like visiting a link is, and opening a lightbox is mutually exclusive to zooming.
It's honestly the same for galleries and gallery lightboxes, so would a good meaningful first step be to add "Expand on click", and the improved dropdown appearance (which features icons) to this dropdown?
It does open a question we have to answer eventually: what happens in a 5 image gallery if all but the third image is set to "expand on click"? My instinct: lightbox arrowkeys would navigate images 1 and 2, then you'd exit, and then you could again swap between 4 and 5, then exit. Of course not ideal, but nevertheless reflecting what you can do.
CC: @mikachan
luisherranz commentedon Jul 3, 2024
Can't we remove/hide the "Expand on click" option of the Image block when the image is inside of a Gallery block, and add a global "Expand on click" option to the Gallery block itself?
14 remaining items
akasunil commentedon Aug 1, 2024
I have opened this PR #64014 to implement lightbox setting on gallery.
nekromoff commentedon Dec 22, 2025
So is this ready or what? Best practice UX that has been around for 10+ years that WP does not include by default?
bradhogan commentedon Dec 22, 2025
@nekromoff I've got a free plugin that does this in the queue for approval that will hopefully get approved soon. The only feature is literally that it adds the option to make a gallery open in a lightbox with arrows to scroll between all gallery photos (in the lightbox).
t-hamano commentedon Dec 23, 2025
For those who want to test this feature, it's in development in #62906.
Please use the link below to give us your feedback:
https://playground.wordpress.net/?gutenberg-branch=gallery%2Flightbox
tyxla commentedon Feb 12, 2026
@t-hamano should we close this one now that #62906 landed?
t-hamano commentedon Feb 13, 2026
I think so. This feature will be available in 7.0. I look forward to your feedback!
leotiger commentedon Apr 6, 2026
I provide some related enhancement ideas for Gutenberg, e.g. allow to display images added to a carousel block as if working in a gallery on activating overlay. https://github.com/leotiger/wordpress-enhancements
jasmussen commentedon Apr 7, 2026
Nice, @leotiger, is this something you would consider contributing to the core project? Notably this piece:
leotiger commentedon Apr 9, 2026
Hello @jasmussen, I'm not really into development anymore, I'm working with Wordpress as I need the platform for a specific problem and one of the solutions is WP-based. After many years, decades I'm back using Wordpress. Back than I offered and maintained some plugins for WooCommerce in the WP universe. Right now I will release everything I'm doing to the public, and hopefully someone feels intrigued to push things further... there are some valid ideas, over the next days I will publish more stuff. Once I'm done with my integrations and things are working we can discuss what's good for WP itself and how to give continuity to the rest.
leotiger commentedon Apr 11, 2026
Finally Multisite was a bad layout decision for my needs, I switched back to single instance, the side effect, I wrote a trid based mu-plugin accompanied by its own language switcher, kind of a WPML for the poor... It's published now within the wordpress-enhancements mentioned above.
leotiger commentedon May 17, 2026
Hard stuff, being out of the business of doing computer stuff for nearly 10 years was a challenge... Today I submitted a plugin to wordpress.org... Hopefully it is worth attention... Lingua Forge it's called... Personally, I'm quite happy with it, but if it really makes its way depends on many other factors... Have a look at https://github.com/leotiger/lingua-forge
That said, I need a break, but I'm quite intrigued now with AI... and will have a look if I can contribute as long as it has a return for me... Some minor things I did to solve "personal" problems for my WP single instance may have value for the community... apart from the full-fledged plugin I wrote now based on former work dedicated mostly to be run on my own instance and abstracted into something that may be useful for many people and anger others offering the most basic services behind paywalls. Lingua Forge doesn't.