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

Make Origami lazy loading use native lazy attribute #1306

Open
benwallman opened this issue Oct 18, 2023 · 0 comments
Open

Make Origami lazy loading use native lazy attribute #1306

benwallman opened this issue Oct 18, 2023 · 0 comments
Projects

Comments

@benwallman
Copy link
Contributor

Origami was written prior to the implementation of lazy loading of image attributes.

https://caniuse.com/loading-lazy-attr

By adding loading="lazy" to img elements, the browser automatically defers loading until the image is nearly on display.

This currently has 93% browser support, and is backwards compatible where older browsers will just download the image, ignoring the attribute.

We can continue with the current approach for old browsers with a browser check, or we can remove our custom lazy loading for images entirely: https://stackoverflow.com/questions/58043418/check-native-browser-support-for-lazy-loading-images

@origamiserviceuser origamiserviceuser added this to Backlog in Origami ✨ Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Origami ✨
  
Backlog
Development

No branches or pull requests

1 participant