Resizing images by setting width/height combos using CSS is a very poor method. Not to mention it fails miserably when the aspect ratio is unknown. What I would recommend is using a service like sencha io src to resize the images for you. If you want greater control with different aspect ratios apply the images as backgrounds and use background-size: contain. That trick work s incredibly well when image sizes and orientations are unknown yet the images need to "fit" in a container with defined relative or absolute dimensions. If the image is content than you might get slapped for using a background-image but I think it is a worth while trade off. You could always place the images down as normal image tags and hide them if your gun-ho on having actually image tags yet would like to use the power of CSS3 background-size: contain.
I'm sure there are other ways in which you can get similar effect. Unless you have time to search for a better one, I would just use the one that serves your need and perhaps fine tune it as you go along. You might pick up a few things by doing it.