Skip to content

Prevent images and videos to load before the page is fully loaded even if they are on screen #592

@Julien-ELKAD

Description

@Julien-ELKAD

Hi guys,

I'm pretty new using vanilla-lazyload and this is awesome !
However, I have a small problem, when I use Google PageSpeedInsights, I can clearly see that my video and images that are visible on the screen on page load are being loaded by the lazyload even though the page is not done loading.

Here is my code which is located in a js script file with defer attribute :
document.addEventListener('DOMContentLoaded', () => { var lazyLoadInstance = new LazyLoad(); });

I do not understand why it does not wait for the page is fully loaded. Can someone help me please?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions