First thing that comes to mind is using CSS columns for masonry effect and use embed Lightboxes ( with groups )
But give a read-through here for masonry effect:
and for CMS Lightbox
Hope this helps