• Resolved Anonymous User 21171082

    (@anonymized-21171082)


    Hi,

    Is it possible to disable Lazy Load for background-image, but keep auto-scaling enabled and Webp conversion enabled?

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support adamewww

    (@adamewww)

    Quick answer: No, sorry.

    Our automatic scaling is directly tied to our lazy load, and, with some types of image delivery, such as in a background image, the only way for the plugin to touch it to be able to deliver the WebP version is also with lazy load. You can see more information about it here: https://docs.ewww.io/article/74-lazy-load

    Ok. Can I at least get “Picture WebP Rewriting” without lazy loading? I need webp and lazy loading for all images except 1 single LCP image in articles. I added the “data-skip-lazy” attribute to that images but with lazy-loading it also disabled Picture WebP Rewriting

    • This reply was modified 1 year, 2 months ago by Alex Kozack.
    Plugin Support adamewww

    (@adamewww)

    It has to do with how the image is defined whether or not something can see it and see that an image is actually there. Lazy load has that functionality built-in which is what we can tie into with Picture Web and JS WebP. If you want me to look at a specific example, I’d be happy to, but otherwise, it’s probably not going to work unfortunately. But here’s the other thing… who’s saying you have an issue with LCP?

    You can contact me directly here: https://ewww.io/contact-us/

    According to

    You should avoid setting loading=lazy for any images that are in the first visible viewport

    web.dev

    it feels logical to me to disable lazy loading for some cases. For example, in our design, the first thumbnail of an article is guaranteed to be loaded in the viewport. So I tried to somehow disable lazy loading for this specific place but leave it in other places and leave the conversion to webp

    Plugin Support adamewww

    (@adamewww)

    Gotcha, and yes, it can provide some benefit. However, if the WebP version is much smaller than the original, it may still be worth it to use that, especially if you have a lot of mobile users. The smaller image may save more time than the delay from loading.

    As I mentioned previously, it’s really based around how the image is being served. Because these are in CSS files defined as background images, they can’t be touched, except by lazy load. Well, technically you could use our Easy IO CDN and be able to do what you would like, but that’s a paid option.

    Really the only option is to use lazy load and get WebP or not use either. Even without WebP, it may still be better, considering how much the WebP saves. I guess if you really wanted, you could hard-code the WebP as the background image. You would lose the fallback ability but you wouldn’t have to lazy load it.

    Plugin Support adamewww

    (@adamewww)

    I’m going to resolve this thread however if you have any other questions, please feel free to open a new one.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable lazy load for BG image’ is closed to new replies.