• Resolved alexaneel02

    (@alexaneel02)


    Hi,

    the new lightbox in wordpress 6.4 is very good for individual images, but it doesn’t work properly in galleries. It enlarges the cropped images instead of displaying the original image. Is there a solution for this?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Do you have a link where you can see this? Another plugin or your theme may also be interfering here.

    Thread Starter alexaneel02

    (@alexaneel02)

    I tested this with several themes, with plugins disabled. For example with Twenty Twenty Three. Here is an expample page:
    https://abraxis-kassel.de/demo-wordpress/galerie-test/
    Below the gallery a few images are shown as individual images for demonstration purposes to show their original image ratio.

    Can see the problem and can also reproduce it in my case. However, I don’t see any way of influencing the behaviour. I would recommend that you report this to the Gutenberg team so that they can evaluate it: https://github.com/WordPress/gutenberg/issues

    Add this CSS for quick fix:

    .lightbox-image-container {
        width: 100vw !important;
    }
    .lightbox-image-container figure img {
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: 100% !important;
    }
    Thread Starter alexaneel02

    (@alexaneel02)

    Thanks threadi for checking and pointing out and Ashutosh Sharma for the quick fix. Works flawlessly!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘lightbox on gallery enlarges the cropped image, not the original format’ is closed to new replies.