Have an image applications, on the left is a narrow column contains many <img> thumbnails whose content is Base64, like <img src="dataimage/jpeg;base64,...">. Users click on one will display a much bigger image at right.
HTML attribute height="##" is very useful to keep the thumbnails in a small size even when it's clicked on. On the contrary, style="height:##; max-width:##; max-height:##" will change a thumbnail into a full-scale image and bump others over the cliff.
Most of the images are portrait, a few are wide landscape format. You can see a single height attribute is not good enough. So I add a width
<img src="dataimage/jpeg:base64;..." height="50" width="50">
it does help locking the width but turns all thumbnails into 50x50.