This is set up like the Easy Square Gallery, but it operates in a horizontal masonry fashion. It works at any size, I just have it in a 1600px div to show the full effect. To add and remove images, you just need the image tag, with its src and 'rel="lightbox[gallery]"' you can have more than one gallery by changing the "gallery" to any other id you want to give it. It automatically resizes the images to span the width of its parent.
UPDATE: you can have a different thumbnail image, or a compressed version of the image by using the srcset attribute in the image tag (ex. <img src="/wahelper/GetImage?id=275749" srcset="/wahelper/GetImage?id=275749&width=400" rel="lightbox[gallery]" title="Caption" /> )