WordPress / wp-lazy-loading

Feature plugin for testing and experimenting with the "loading" HTML attribute.
https://wordpress.org/plugins/wp-lazy-loading/
GNU General Public License v2.0
69 stars 21 forks source link

Review whether lazy-loading should cover more than images #3

Closed felixarntz closed 4 years ago

felixarntz commented 4 years ago

The current version of the spec proposal does not include any information about loading becoming available on iframe tags. Chrome does support that, but if that is even more experimental and not tied to the spec itself, we should not include it, especially as the primary focus certainly is images.

Let's gather some more information on this and revisit.

Tabrisrp commented 4 years ago

There is a plan to update the spec for iframe too, but will be done separately, per comment https://github.com/whatwg/html/pull/3752#issuecomment-572174747

azaozz commented 4 years ago

Yes, that's my understanding too. Also the auto value for the loading attribute seems to have been dropped from the specs: https://github.com/whatwg/html/pull/3752/files#r344740202.

What would be best to do in WP in that case? Shall we keep the option to auto-add loading="lazy" to iframes, or shall we add it when the specs are ready (or nearly ready)?

Opened https://github.com/WordPress/wp-lazy-loading/issues/5 to follow up.

felixarntz commented 4 years ago

I've confirmed that inclusion of iframe tags is not planned in this iteration of the spec. It's likely coming in the future, but I think it makes sense for us to exclude iframes from here - especially since the impact of lazy-loading images will be much bigger.