WordPress/wp-lazy-loading

Review whether lazy-loading should cover more than images

felixarntz opened this issue · 3 comments

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.

There is a plan to update the spec for iframe too, but will be done separately, per comment whatwg/html#3752 (comment)

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 #5 to follow up.

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.