If you are looking for resize image as per its parent block and it must maintain aspect ratio?
jquery plugin “Aspect Ratio”. It fit image to parent container
e.g. suppose i have an <div> having ID as container. all the images
should be resized as per the width of the <div> and images should
maintain it’s aspect ration too.
- Add the jquery library to your page.
- Add the Dimensions plugin to the page – http://plugins.jquery.com/project/dimensions
- Finally, Add the Aspect Ratio plugin to the page.
To manipulate all images on a page w/ the AspectRatio plugin, simply type…