-
Notifications
You must be signed in to change notification settings - Fork 15
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
Request large image only when it is in the viewport? #42
Comments
Lazy loading is out of scope of this library.
|
I wanted to do this too. Maybe it's not the best way, but this is my process incase anyone else is searching. I did it by having a flag in the component state to check if the waypoint had been entered or not. If so, change the flag to true and show the ProgressiveImage. Here's the codes: Make sure both are imported:
Add a state for when we should render the progessiveimage. This goes in your constructor, or the earliest point of your component lifecycle:
|
It would be nice to not have to depend on not rendering |
Thanks for the super cool library.
Just wondering, is it possible to request the original image only if the image is present in the current viewport. This feature will save lots of bandwidth and improves performance, especially in mobiles.
Thanks
The text was updated successfully, but these errors were encountered: