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
Images loading instanstly #8
Comments
Did the console ouput any errors, what version of jQuery was included and in what browser did this happen in |
No console errors, jQuery version is 1.9.1 - I've tried Chrome, Safari and Firefox on Mac so far... I could share the link with you if this would be helpful? |
Of course, send a link and I'll look into it. |
Same here. I'm trying to load PNGs. Can that be the cause? |
Just checking: @juergengenser & @andreasbecker, are you altering the img tags that WordPress outputs, somehow, so that the image's URL is stored in data-src rather than src? If not, the images will load straight away, of course. |
Problem was that width and height attributes were not set on the image tag. With them set it's working perfectly. |
Ah, that is interesting. Often, people omit width and height attributes for responsive designs, but clearly they need to remain if this plugin is to work. Thanks for the info. |
…although, relying on height attributes will result in imprecise calculations if the image is forced to scale with a responsive design, of course. |
I've seen the same everything-loads-at-page-load problem using both lazyload and unveil, even with the image width and height set. I'm just fiddling with it on a throw-away page with 1x1 black images: http://foodini.org/fingerme.cgi |
|
I'm trying to implement unveil in a Wordpress-based site. It should target only a specific range of images - however, the images seem to load instantly, not when they are coming into the viewport.
What could be the problem here?
Thanks,
Jürgen
The text was updated successfully, but these errors were encountered: