Hey again,
Updates
I’ve just sent out an update – but it doesn’t address your issue in particular. I have updated some of the dependencies, so if there is a bug in that code it may have been addressed by its author. If not, read on.
Image Size and Thumbnails
So, how large are your images? Your buffer size is 40mb. Are you loading high file-sized images? If you are outputting that much per page, you may chew through more bandwidth (and more of your visitors time) then you need to. Or maybe your site has a very different layout to mine (which isn’t a bad idea) and it makes sense in your context.
Still, maybe check your thumbnail sizes under WordPress’s media settings. These are the image sizes which the plugin uses. Also note which size you’re fetching with the quality
parameter. The default is "thumbnail"
– but how large that is depends on your WordPress settings.
Preloading
Now, the plugin does preload each image before it renders it to the screen – one by one. It has to do that, otherwise it would not know how big each image is and thus where to place it in the gallery. But still, it only preloads the image size specified by the quality
parameter – not the full size image (unless you tell it to).
You can load the thumbnail size in the gallery, but link to the full size image, with the
link_location
parameter. [cactus-masonry quality="thumbnail" link_location="full"]
would preload and display small images (as defined by WordPress) in the gallery but link to the full sized images when each gallery item is clicked.
Large Images and Infinite Scroll
However, maybe your loading a list of tall and/or wide images – then you may have a problem with the default infinite scroll setting.
If you have large images like that, then infinite scroll may be attempting to fetch too many images at a time. Infinite scroll loads the images in groups of 30 at a time. You can change this by setting the posts_per_page
parameter. However, infinite scroll will keep on loading until enough images have been fetched to cover past the bottom of the page (and then a little bit).
I hope this helps.