Lightbox image height

Hi there,

I’m trying to apply a standard aspect ratio to some light box images, ideally as an optional control that I can apply to some, but not others. I need to have some images on a page show as 16:9, but show in their original dimensions when opened in the lightbox.

Is this possible? I figured I might be able to create a class, but it hasn’t really worked so far!

Thanks for your help,
Karolina

Hi There,

You can add a lightbox selector and link your images on the page to another images (same image, but different image file)

So for, example, a way of achieving this would be to add an image element. with your image 16: 9

Add a class lightbox-launcher

Link to your image with original side.

Add a raw code element in Cornerstone and add the lightbox selector

[button href=“image-1.jpg”]

[lightbox selector=".lightbox-launcher"]

Hope that helps!

Please see our official instruction to setup a lightbox at https://theme.co/apex/forum/t/shortcodes-lightbox/165

For a demo, please see https://youtu.be/L5T7Ji64jTo

Thanks.