I have a loop querying an ACF Gallery inside an ACF CPT. The gallery has more than 50 images. I am only querying 6 images at the start and have infinite scroll for the rest. The problem is that in the lightbox, it only shows 6 or 12 or whatever images it has already loaded while scrolling. Is there way to show all the images in the lightbox? Or what would be the optimal setup for such a task. I don’t want to load all the images right away to not increase my page size too much.
I would suggest you loop through all images. Use custom CSS to display only first 6 and hide the rest with display none. Your lightbox should include all images . Make sure Bricks lazyload is enabled so images with display none won’t load.
1 Like
The thing is that I need to show them in a masonry too on the page. But from what I see, when I loop all of them, they all have loading=“eager” instead of “lazy”, even though I choose them to be “lazy” loaded. Perhaps the issue is the masonry, I don’t know…