I have a gallery of photos which uses Infinite Scroll as the pager. I am also using the fancyBox module so that when I click each photo it appears in an overlay, with the photos grouped per page so I can cycle through them with the FancyBox overlay.

The problem I have is that I can only cycle through the photos that have already been loaded by the Infinite Scroll (which makes sense as they are the only photos the Infinite Scroll has 'seen'). But what I want is to trigger the infinite scroll to load more photos just before I reach the end of the cycle with the FancyBox overlay so a user can simply use the overlay to cycle through all the photos on the site without having to use Infinite Scroll to load them all first.

Any help with the sort of thing I should be thinking about to try and achieve this?

  • ugh... sounds like you'll need custom work. But try the Image Lazy Loader Module
    – No Sssweat
    Commented Nov 5, 2015 at 11:10
  • Awesome, this doesn't work with infinite scroll but by just displaying all items instead it seems to have the same effect and the fancybox integration works too (can't really tell exactly when everything is loading though as I don't have much content). Really cool module regardless, I'd never heard of it before.
    – dippynark
    Commented Nov 6, 2015 at 12:32
  • 1
    If you re-post your answer as an official answer then I'll mark it as correct (as far as I know that's the only way to do it).
    – dippynark
    Commented Nov 6, 2015 at 12:36

1 Answer 1


ugh... sounds like you'll need custom work. But try the Image Lazy Loader Module

This is a small helper module which will automatically lazyload all images for sites with multiple images, which will make the site load faster.

All images will only load when it's visible to the browser window.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.