Generate "thumbnail" in html keeping aspect ratio
Is it possible to shrink an image in html while maintaining aspect ratio?
I know I can use the height and width attribute of the img tag, but I don't know the size of the image.
Please don't tell me to find out the size of the image on the server, or that the correct way to do it is to create thumbnails on the server side, and this saves bandwidth and improves page load times.
I know what the perfect solution is. But I want a quick and dirty ...
+2
source to share
3 answers