If you will access pinterest.com website, on home page you can see all the updates that resides automatically with images and a brief article in a grid based layout pattern.
[caption id="attachment_12932" align="aligncenter" width="800"]
Collage Plus to fit images within container[/caption]
No matter how small or big your image is when it comes to show in grid thumbnail layout the images automatically gets resized in a random size so that whole page looks so arranged and looks every single space of the webpage is busy and productive in nature.
CollagePlus is a jquery plugin that fit images in to given container on a grid layout. You can set margin, padding between images, can set the opacity and can set the alignment of the images too.
So basically you can customize the layout of the displayed images very easily while fitting images into container.
[button color="red" size="small" link="http://ed-lea.github.io/jquery-collagePlus/" target="blank" ]Demo / Download[/button]