Lazy-loading is a good thing when used correctly, but these stats strongly suggest that there’s a major opportunity to improve performance by removing this functionality from LCP images in particular.
WordPress was one of the pioneers of native lazy-loading adoption, and between versions 5.5 and 5.9, it didn’t actually omit the attribute from LCP candidates. So let’s explore the extent to which WordPress is still contributing to this anti-pattern.
Similarly, a disproportionately high percentage of pages that use custom lazy-loading are built with WordPress at 54%. This hints at a wider issue in the WordPress ecosystem about lazy-loading overuse. Rather than being a fixable bug localized to WordPress core, there may be hundreds or thousands of separate themes and plugins contributing to this anti-pattern.2022 Web Almanac – Chapter 12: Performance
Prior to the WordPress 5.9 update, WordPress’ default of lazy loading implementation was causing slower LCP performance, because it had been applied too aggressively and was lazy-loading images above the fold, which is not needed. In 5.9, WordPress shipped a fix that more eagerly loads images within the initial viewport while lazy-loading the rest as they come into view. That’s why results that show WordPress sites overusing lazy-loading are surprising to see.
“Admittedly, ‘lazy-overloading’ a hard problem to solve. We don’t always know whether an image will be the LCP. WordPress core sets it on every image by default and uses heuristics to unset it. Nearly 3/4 of pages that natively lazy-load images are on WordPress.”Rick Viscomi said in his Twitter thread analysis.
In 2020, Viscomi commented on how quickly the adoption of native image lazy-loading shot up after the WordPress 5.5 update was released in August of that year with images then being lazy-loaded by default. WordPress has been driving adoption of this feature, which is why any implementation “anti-pattern,” as Viscomi characterized it, has an outsized effect on the performance of the web.
As of October, 10.6% of the web is using native image lazy loading, per @HTTPArchive. That number was 1.5% in July! 🤯— Rick Viscomi (@rick_viscomi) December 30, 2020
This appears to be _entirely_ driven by WordPress at 28.9% of WP pages, which makes up one third of the web.https://t.co/QYGyyctFgc
left: all web
right: WP pic.twitter.com/RQnDw4UZ56
“What gives, WordPress? My theory is that it’s not the core heuristics that are wrong, it’s the plugins. Also, keep in mind that the majority of pages that even use lazy-loading are WP. To support the plugin theory, let’s look at custom lazy-loading of LCP: More than half of the pages that do it are built with WordPress. WordPress is ‘only’ a third of the web, so there’s clearly something going on with JS-based lazy-overloading in WP.”Rick Viscomi