Skip to content
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

Eager Loading #39

Closed
hecktarzuli opened this issue Oct 14, 2020 · 1 comment
Closed

Eager Loading #39

hecktarzuli opened this issue Oct 14, 2020 · 1 comment

Comments

@hecktarzuli
Copy link

hecktarzuli commented Oct 14, 2020

I haven't played with this yet, but per our Nuxt Meeting today, @pi0 wanted me to put this in as a reminder.

We should be able to eager load images just BELOW the viewport (similar to lazysizes). The goal is for the user to never actually have to see an image load. I assume this window (#px) would be configurable in the nuxt config and maybe even at other levels.

You should be able to just pass a rootMargin to the observer options with the required eager amount.

You could also take into account the device/network to expand the eager window (similar to what Chrome does for loading=lazy)

@farnabaz
Copy link
Member

farnabaz commented Oct 22, 2020

With intersectOptions users can control rootMargin and other options of IntersectionObserver

Thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants