The Justified Gallery keeps your images in set rows, but adjusts the thumbnail size based on the image size and orientation. So a mix of portrait and landscape images will result in longer thumbnails for portrait images. Likewise if there are fewer images in a row, the thumbnails will also be slightly longer.
To select the Justified Gallery, click on the drop down menu above the Gallery Settings and select Justified Gallery. Below is a screenshot of the Gallery Preview for the Justified Gallery.
As you can also see in the screenshot above, the settings for this gallery will allow you to adjust the Thumb Height, Row Height and Max Row Height, along with the Margins between the images. The sizes of your thumbnails will impact on the layout of your gallery.
You are also able to link the thumbnails to a lightbox like FooGallery.