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

Feature Request: Add native loading=”lazy” support #32

Open
KZeni opened this issue May 9, 2019 · 1 comment
Open

Feature Request: Add native loading=”lazy” support #32

KZeni opened this issue May 9, 2019 · 1 comment

Comments

@KZeni
Copy link
Contributor

KZeni commented May 9, 2019

Chrome is implementing a loading attribute for images and iframes which can then be set to lazy to have it natively lazy load the element with JS then only being required for browsers without the feature (with it then having feature detection to help determine if the JS code is needed or not).

You can see more about this here: https://addyosmani.com/blog/lazy-loading/

Also, https://chromestatus.com/feature/5645767347798016 shows that Safari is interested in adopting the feature as well as providing a placeholder to show until the element’s loaded (exact comment on the matter is here: whatwg/html#2806 (comment))

Either way, I’m thinking this could be the next step in improving this functionality and being one of the first plugins to support it (while having the nice existing JS fallback) could be a nice differentiator. Also, it seems like implementing this wouldn’t be too terribly time intensive.

I also mentioned this at https://wordpress.org/support/topic/feature-request-add-native-loadinglazy-support/, but I figured I'd mention it here for more development visibility.

Thanks for the great plugin,
Kurt

@alextuan
Copy link
Collaborator

@KZeni Thanks for feature request , i really like that feature, will have look and see if we can add it on next version, we are converting plugin to Composer autoload , also more security with sanitize inputs and esc outputs

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