-
Notifications
You must be signed in to change notification settings - Fork 448
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
Adding img placeholder to picture tag causes lazy loading to fail. #270
Comments
+1 Encountering the same issue. It would be awesome to have this work properly. |
Was able to make it work, just place the |
@AbdellaouiSofiane nice catch! Adding that works when loading the page and scrolling to the image that has lozad enabled on it. However, if you load the page over the image that has lozad enabled on it, the EDIT: From looking at the network tab, it actually looks like it's being loaded onto the page at some point, then being removed once the page has fully loaded. It may be something to do with my setup - not entirely sure. I'm using Nuxt/Vue, so it may be something to do with hydrating the app. |
Same problem here... no way to validate the html source without img tag inside picture. but if I add the img tag the script fails |
any suggestion? |
Try this one https://github.com/verlok/vanilla-lazyload |
I'm trying to use lozad with a picture tag and and img placeholder like described in documentation:
Without the img placeholder, it works fine, but adding an
img
tag actually causes all images to be loaded (even if not within viewport) like when not using lozad at all (except the picture tag getsdata-loaded=true
).I'm using
Chrome Version 92.0.4515.107
(64 bits) and I'm onUbuntu 21.04
.Am I doing anything wrong here ?
The text was updated successfully, but these errors were encountered: