I have images that will be quite big in dimension and I want to shrink them down with jQuery while keeping the proportions constrained, i.e. the same aspect ratio.
C
Does
help?
Browser will take care of keeping aspect ratio intact.
i.e max-width
kicks in when image width is greater than height and its height will be calculated proportionally. Similarly max-height
will be in effect when height is greater than width.
You don't need any jQuery or javascript for this.
Supported by ie7+ and other browsers (http://caniuse.com/minmaxwh).