

What’s being proposed represents a clear improvement as the test results listed below demonstrate. While the current WordPress implementation of default lazy loading was not ideal, adding lazy loading in this manner is a clear improvement over not adding the loading attribute at all. The reason is because all themes are coded differently and this kind of granular exclusion is best done by the theme developers for that reason. WordPress implemented lazy loading like this because it had no way to accurately exclude the most important images from receiving the lazy loading attribute.
#Wordpress 5.9 bugs code
The developer who published the proposal to improve LCP noted that as of WordPress 5.5 the core code added the lazy loading attribute by default to all images and iframes.īut that’s not ideal because the images at the top of the page, like logos and featured images, need to download in order for the web page to become usable. Largest Contentful Paint (LCP) measures how fast image and other elements download in the site visitors viewport (the browser screen that the visitor sees).Īn image is usually coded in HTML like this: Īdding lazy loading is a simple matter of adding the lazy load HTML attribute: How WordPress 5.9 May Improve Largest Contentful Paint This makes the page interactive faster for the site visitor. The loading attribute tells the browser to delay downloading an image, freeing the browser to download more important page elements that are immediately viewable to the website visitor. The loading attribute modifies the image, in this case, by telling the browser to delay downloading it. Using lazy loading, elements like images that are not viewable in the site visitor’s browser screen can be delayed by using an HTML attribute called the loading attribute.Īn HTML attribute is code that modifies an HTML element, like an image. Lazy loading is a way to speed up the perceived download of a page by delaying the download of web page elements such as images and iframes that are not needed at the moment. Lazy Loading and Largest Contentful Paint This is a more sensitive default than what the current implementation uses, that on average and at scale will result in better LCP performance out of the box, while keeping necessary bandwidth low.” “Instead of lazy-loading all images and iframes by default, the very first content image (also considering featured images) or content iframe should not be lazy-loaded. This is how the proposal describes the improvement: That said, it was found that by refining how the lazy loading is added by default results in significant improvements in the Core Web Vitals metric called Largest Contentful Paint. The proposal states that fine grain control of the lazy loading attribute belongs in the hands of theme developers. Proposal to Improve Core Web Vitals in WordPress Testing revealed that the proposed change improved a Core Web Vitals performance metric by a median average of 7% to as high as 33%.

WordPress published an article in their developer section proposing to refine WordPress’ default lazy loading behavior.
