How to make a ribbon photo like flickr or 500px?

Tell me how to do the same layout of photos with resize depending on the screen size as the feed sites flickr or 500px? Possible I would like the easiest and most lightweight option without jquery and without using the newfangled flex-box to work even on not the most modern browsers.
UPDATE: AND if you take into consideration that I know in advance the dimensions of the photo? The aspect ratio of all 3-to-2, height 300 pixels, width 200 or 450 for vertical and horizontal pictures respectively.
b871a959758548f4a81df52b52f4018a.jpgdbac21d0c24f49bfa98694b6a359d815.jpg
July 8th 19 at 11:51
3 answers
July 8th 19 at 11:53
Solution
July 8th 19 at 11:55
I have a friend one, a very good front-andseek.
He wrote that such a plugin tj-s.ru/tod/tj-gallery.html
Quite easy and cool, I put on a couple of sites already.
Without jquery you is unlikely to correctly implement.
If there's a problem, on the website it ask.
July 8th 19 at 11:57
Google the word masonry
masonry.desandro.com

Find more questions by tags CSSHTML