Pinterest-Style Cascading Grid Layout

Extending Faye’s idea is to have nested repeating groups. The outer groups searches for all images. The inner group filters the list from the outer group according to which number it is, which it gets from the current cell index.

This works well for being responsive, it can have 4 columns down to 1 column depending on page width.

My test picture selection isn’t as nice as yours!

I noticed the pictures at the bottom become uneven, the method depends on the average picture height being consistent.