Full-width responsive gallery respecting image proportions

Hello everyone!

I’m starting to build a portfolio to display some of my photos and I’d like to create a full-width responsive gallery that would work like this (see picture below):

  • The gallery respects the proportions of all images. No cropping of any kind.
  • No tiled effect, only rows with a different number of photos per row.
  • The hight of the rows adapt to the number of photos per row.
  • It works with lightboxes.

I tried to build it with flexbox but I think it’s more complicated than that. I saw that type of gallery on another website (obviously built with Wordpress) and I’m pretty sure it’s been generated with a plugin.

I really love that type of gallery so any tips to reach that goal with Webflow would be more than welcome!