Mystery space within custon masonry grid

Hey friends,

Hoping someone might be able to help me troubleshoot a custom masonry/Pinterest style image grid I’m working with. It’s for a photographer’s portfolio that will feature six images at a time, and the images alternate between portrait and landscape.

I’ve noticed something funky is happening where there is extra dead space below my grid when the images alternate.

If I adjust the order of the photos so that the third portrait image doesn’t “wrap” to the top, the dead space disappears.

Any idea how I can avoid this dead space while maintaining the alternating image order I’m going for?


Here is my site Read-Only Link

Here is the Published Link![Screen Shot 2020-03-23 at 10.47.53 AM|690x377]