Agreed, you can use php to retrieve image information, or even to resize images, but it's not a requirement.
Code:
<div style="width : 100px;height : 100px;"><img src="yourimage.jpg" height="100%"></div>
I believe the code above does what you want, but mind you that it will somewhat distort larger images.