Image size to fit screen in Lightbox

Hi,
I want to add a gallery of pictures. Some are in a vertical, others in a horizontal format. However, when I click on one of them and I use the interaction type “lightbox”, the picture gets bigger, but doesn’t fit the screen. That means, when a user clicks on a vertical image, he or she would need to scroll up and down to view it. I would like the user to view the image (be it vertical or horizontal) at once, when it is clicked on. Is there a way to have an image in lightbox fit the current screen? Thanks for your help. Gabriel

You should use a standard height for the images displayed in the lighbox - regardless of orientation. The lightbox will always adjust itself to the size of the image. If it’s particularly large, the page will need to be scrolled to see the whole image. An ideal situation for most devices will be to use a height of about 900 - 1200 px, regardless of orientation. A useful feature for doing this is to use the Alternative Image option in the lightbox settings. Your alternative images can then be created with identical heights.

Hi @gabiek33

Have a look at this following post, this should do the trick.
Just copy/paste the code to your Page Settings

1 Like

Thank you so much for your answer, I’ll try that!
:grinning:

Thank you so much for your answer, I’ll read it and try to apply it!

:raised_hands: