Opened 7 weeks ago
Last modified 5 hours ago
#64978 new defect (bug)
Lightbox shows cropped gallery image, instead of full-sized image
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | |
| Focuses: | Cc: |
Description
Environment
- WordPress 7.0 RC2 installation
- Minimum install. Default 2025 theme with "Afternoon" styling.
Steps to reproduce
- Create a gallery with multiple images of different aspect ratios
- Crop Image to Fit: True
- Aspect Ratio: Original
- Publish
- Gallery should appear on new post with cropped images
Bug
- Clicking on image in post causes Lightbox to pop up
- The image within the lightbox is still cropped
- Lightbox image should be the original image, uncropped
Example of bug:
https://blog.heathenlab.net/2026/03/29/gallery-test/
Change History (4)
#2
@
7 weeks ago
The gallery image cropping is entirely dependent on the viewport. When the example page is shrunk to mobile dimensions, the third image is displayed uncropped on a second row and in the lightbox.
The full image is still present in both the gallery and lightbox, proven by right-click "Open Image in New Tab" revealing it uncropped. The issue seems to be purely in the lightbox display and not with user intent, with viewport specific cropping carrying into the lightbox.
Regards expected behaviour, the "Lightbox for Gallery and Image Block" plugin always displays the full image in the lightbox. This is also a workaround for the bug. (Plugin page: https://wordpress.org/plugins/gallery-block-lightbox/ )
A second demonstration showing this:
https://blog.heathenlab.net/2026/03/30/gallery-and-image-block-plugin-demo/
Thanks for the report.
This doesn't seem like the expected behavior to me. The cropped image is a user's explicit decision. Exposing the uncropped image could lead to the leakage of unintended information.