Help with 'pinterest-esqe' layout using F'in sweet attributes + custom code

Hey everyone,

Im creating a showcase gallery for individual images (they’re in lightbox elements as well). Im trying to create a pinterest-esqe feed, with variation in image size. I found a cloneable with some custom code which works when used in standard pagination mode.

However I wanted to bring in a filter as well as infinite scroll. I’ve used F’in sweets attributes for this. It works successfully. However the script which creates the variation in image size seems to stop working after a small amount of images. With no other images being affected when scrolling further.

I’ve tested it in so many different ways and it definitely seems to be the F’in sweet attributes script that causes this issue.

I know veeeeerry little code, and this seems to be a script issue. If anyone could help me understand the problem, I would be truly appreciative.

I’ve set up an example here for the read only link.

Here is my site Read-only: Webflow - Jahren's Supercool Site

Thanks,
Jahren