Support » Plugin: Lazy Loader » 10 images are preloaded in a gallery with 3 in a row

  • 10 images are preloaded in a gallery with 3 in a row.

    At the moment 10 images are loaded but I have rows of 3 on a page so I would like 9 loaded instead. How can I change the number loaded per page if needed for a better end user experience?

    Some other pages have 2 or 5 images in a row so those pages load nicely though.

    Regards,

    Glen

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hi Glen,

    it is not possible to define a specific number of images. You could modify the expand value, but that might bringt you unwanted effects in other places, but maybe it is worth a try (if you really want that behavior). You can find the options of the script in its GitHub repo: https://github.com/aFarkas/lazysizes#js-api—options And I described how to modify the settings in another forum post: https://wordpress.org/support/topic/lazy-load-css-background-2/#post-10219851

    I am not sure why lazysizes loads this first image in the fourth row, maybe it is a little higher on the page during loading so it comes into the initial expand of lazysizes. I think that would be the best place to start: trying to figure out why this one image gets loaded and the two other images not.

    Hope that helps,
    Florian

    I’ll manually move the 2 that don’t load and see if it is just because they are after the 10th position.

    It doesn’t matter if I move the 2 that don’t load. The plugin loads 10 images then another 10 after the 2 blank spaces show up. I just have to figure out a way to preload the next images before they show.

    If 10 have to load, it would be nice if 20 are loaded at the beginning with a setting. Everytime a user scrolls past the first 10 another 10 could be loaded. An option like this would increase the download but get rid of the images not showing up.

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hey, I revisited your page and noticed in the network tab that the images are loaded from a service worker. Could you try to disable the plugin that handles this and check if that makes a difference?

    Thanks
    Florian

    Edit:

    If 10 have to load, it would be nice if 20 are loaded at the beginning with a setting. Everytime a user scrolls past the first 10 another 10 could be loaded. An option like this would increase the download but get rid of the images not showing up.

    There is no such limitation from the script that says »I only/always load 10 images, and then the next 10«. Another thing you could try: enabling the apsectratio option in the Lazy Loader settings. That could help that the next images are loaded earlier.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.