Constraining image sizes if they're bigger than my gallery window

I’m looking for a general concept. I am going to build a gallery of images I’ve got and would like to constrain the images to ALL fit in the same area.

Any thoughts would be appreciated.