Max-height and width: auto makes images jump around in size?

Here’s a video.

When I set an image to max-height: 90vh and width: auto (the idea being that it’s as wide as possible but stops if it’s too tall to view on one screen) the size jumps much smaller after some time clicking and scrolling around. It looks stable in Preview mode, but then the published site has the same issue where the images with this setting are too small.

I’m open to changing the way I have this set up, but I will soon have hundreds of images on this site. I don’t want to manually size each one’s width by vh based on its aspect ratio. Gross.

Thanks for looking!


Here is my site Read-Only

1 Like