最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Built-in image lazy loading: Does it come with a polyfill for older browsers?

programmeradmin2浏览0评论

It's neat that WordPress now automatically adds the loading="lazy" attribute to images. My question is: Does WP now also have a built-in JS polyfill for browsers that don't support the loading attribute? CanIUse reports less than 75% global browser support of the attribute.

It's neat that WordPress now automatically adds the loading="lazy" attribute to images. My question is: Does WP now also have a built-in JS polyfill for browsers that don't support the loading attribute? CanIUse reports less than 75% global browser support of the attribute.

Share Improve this question asked Nov 2, 2020 at 18:24 William BeaumontWilliam Beaumont 1233 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

No, it doesn't.

Browsers that do not support the attribute will just continue loading images like normal, so it wasn't really necessary to include one.

If you want to add one yourself, there are others available that you could include yourself, such as this one.

发布评论

评论列表(0)

  1. 暂无评论