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.com reports less than 75% global browser support of the attribute.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0