How to display a grid of images that have different aspect ratios?

If I have a grid of images, let's say political cartoons, that have differing aspect ratios and cannot be cropped, how can I display them in a grid or even linear fashion?

My current solution is linear, top to bottom, but the images really call for a grid layout of some sort.

Thoughts?