My page has space for an image that can be, say, a maximum 100x100 image. Users can upload any image dimension and the web application will resize it, maintaining aspect rat
<div class="blog-thumbnail"> <img src="img.jpg" alt="img"> </div> .blog-thumbnail { height: 200px; margin: 0 auto; position: relative; } .blog-thumbnail img { position: absolute; bottom: 0; left: 0; right: 0; top: 0; margin: auto; max-width: 100%; max-height: 100%; }