It’s called a masonry grid. Images retain their aspect ratio so they don’t need to be cropped. You can kind of simulate it with css but there’s proposals to add a proper masonry layout to css
yeah. I actually wrote the logic for the layout myself (wasn't really happy with the available libraries). may open source this if people are interested!