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
Carousel / AMP: AMP lightbox applied only to first image, and regardless of image link #17484
AMPBugWhen a feature is broken and / or not performing as intendedCustomer Report [LEGACY]Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report"Triaged[Feature] CarouselA fullscreen modal appearing when clicking on an image in a gallery or tiled gallery.[Pri] Low
Start with a site where you've enabled the Carousel feature under Jetpack > Settings, and where you've added the AMP plugin and set it to Transitional mode.
Go to Posts > Add New
Add some content, and 2 single images.
Add a link to both of those images, linking to other posts on your site.
Publish your post.
On the frontend, you'll notice that when clicking on the images, you're redirected to the other post you linked to.
Add ?amp to the post URL.
You'll notice that the first image (and only the first image) now uses an AMP lightbox: instead of linking out to the other post, it opens a lightbox.
This was introduced in #15398, in an attempt to try to replicate Jetpack's Single Image Carousel feature that was introduced in #5469. There are 2 distinct issues here:
We should only apply the AMP lightbox (in maybe_add_amp_lightbox()) when the image links to an attachment page. In the general implementation of the single image carousel feature, this was done via the data-permalink attribute, added to the image markup and pointing to the attachment page. Any other link would be ignored.
The AMP lightbox should be applied to all single images on the page, not just the first one.
AMPBugWhen a feature is broken and / or not performing as intendedCustomer Report [LEGACY]Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report"Triaged[Feature] CarouselA fullscreen modal appearing when clicking on an image in a gallery or tiled gallery.[Pri] Low
Activity
fditrapani commentedon Dec 17, 2024
@jeherve I confirmed this behaviour still exists.
I'm helping with triaging. Is this something your team would work on or do you know which one might be best to take it on?
github-actions commentedon Dec 17, 2024
Support References
This comment is automatically generated. Please do not edit it.