-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
Skip lazyloading if user has scrolled beyond the image? #235
Comments
Should add - I'm using inside of a container around 300px tall - so there's a lot of images being scrolled past which don't need lazy loading yet :) |
Hey Mark, |
Yes - that does look like the same request - a +1 from me on this when you have time, then :) Perhaps doing something like setTimeout on the images which come into view, and at the end of the timeout checking if still in view before updating the src to the value of data-src?
Mark
|
That’s a good idea. |
Duplicate of #166 |
Hi @mntilbury, I'm currently developing it and I have a working draft in the I was wondering if you need this in version 8.x too or only in version 10.x, because the way to do it in the different version is very different (so it's double work). Of course you need it on version 8.x, it's the recommended and best one, right? 😄 |
@verlok Brilliant - thanks for finding the time to implement this feature. I think as long as there is a graceful degrade to 8.x (which I think I read about on the readme.md), 10.x only should be OK - most of the users of this are going to be in Chrome on Mac, so will be able to use 10.x :) |
You're right. Thanks for the reply. |
Hey guys! I've just released version 10.16 beta with the new feature, so you can give it a try! Let me know how it goes and if I can promote it to stable! (I gave it a try in the demos folder and it works perfectly, but since it's a big change in the revealing algorithm, I want your approval too!) Release notes:Added new option Recipe (from README.md)
HTML <img class="lazy" alt="..."
data-src="../img/44721746JJ_15_a.jpg"
width="220" height="280"> Javascript var myLazyLoad = new LazyLoad({
elements_selector: ".lazy",
load_delay: 300 //adjust according to use case
}); |
I forgot to say it's also on NPM!
I don't know if it will released on cdnjs anytime soon. I'll check. |
@mntilbury could you try 10.16.0-beta and tell me if it works as you expected? |
Closing now. Fixed in 10.16.0. |
@mark-newby-ct there's a new feature that can activated using the |
Hey,
Great library - thanks for developing it. I've got an image gallery with around 1500 thumbnails, and I'd like to prevent lazyload from happening on images I've scrolled beyond. What I'm finding is that even if an image is no longer in my viewport (scrolled beyond it), because I had it in my view, there is a lazyload happening.
Is there any way to perhaps delay lazyload until scrolling has stopped for a given amount of time? I'm running v8.
Thanks!
Mark
The text was updated successfully, but these errors were encountered: