• Resolved woorooo

    (@woorooo)


    Hi,

    I’m having problem lazy loading background-images and latest posts thumbnails on this type of pages.

    For background images I’ve tried the “External Background Images” options and indicated both id and css class like this for example – respond, comment-respond, but this didn’t help. Or better to say it helped on certain pages, but not on this one for some reason.

    The same is with latest post thumbnails, I want them to lazy load, but no idea how to do that.

    Can you please let me know if there is anything that I’m doing wrong?

    Thanks,

    Roman

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Hi, I’m looking at your page, but not sure which images are causing you trouble? Almost all of them are being loaded by our lazyload or JS WebP (or both), so perhaps you figured it out, or changed the page layout?

    Thread Starter woorooo

    (@woorooo)

    @nosilver4u no unfortunately I couldn’t figure it out, here is the screenshot of the images that are not in the view port, but still are being loaded as if there are. The upper 2 are css background images, the lower 3 are “latest post” gutenberg block thumbnails.

    Screenshot

    Any chance I could make them lazy load as well?

    Plugin Author nosilver4u

    (@nosilver4u)

    Thanks for the clarification! With most of those images, they are too close to the viewport, and so they are loaded immediately, rather than risk a user scrolling past them before they load.

    However, if you would like to control the viewport “threshold”, you can see more info here: https://docs.ewww.io/article/74-lazy-load

    For the two background images you highlighted, they are assigned by targeting the :before “pseudo attribute”, which we do not currently support, though I think it could be added without too much difficulty. I’ll look at that for the next release. Although again, since those images are in the same area as the other img elements, they are going to be above the default viewport threshold.

    Thread Starter woorooo

    (@woorooo)

    Thank you @nosilver4u I’ve tried changing the threshold to 100 by adding the following code to Snippets plugin, but unfortunately it still loads the mentioned ‘latest post’ thumbnails.

    define( 'EIO_LL_THRESHOLD', 100 );

    Am I doing something wrong?

    Plugin Author nosilver4u

    (@nosilver4u)

    Oh good grief, I added the threshold variable in the “script debug” version, but not in the production/minified version!
    I’ve fixed it now, so it’ll be included in the 6.1.3 release.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lazy Load Latest Posts and Background CSS Images’ is closed to new replies.