-
-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent images and videos to load before the page is fully loaded even if they are on screen #592
Comments
Hey @Julien-FLEXY, Could you also post the HTML code you’re using for your images? |
Thank you for your answer! Of course, here it is :
The {{ }} tags are used because I'm on Shopify using liquid but this basically just add the right path to the media. Everything is working greatly just the medias visible on screen are loaded too soon and it's decreasing my PageSpeedInsight score unfortunately |
Thank you, |
Of course : |
Thank you. |
Hi verlok :) This is what was generated in the DOM (I just changed the id of the media in the file url because I don't want to display this media in public even though nothing is really private ahah). |
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?
The text was updated successfully, but these errors were encountered: