You've probably heard that lazy loading makes WordPress sites faster. It's one of those performance techniques that sounds technical but is actually easy to understand and even easier to implement.
In this guide, we'll explain exactly what lazy loading is, how it works in WordPress, why it significantly improves page load times, how to enable and configure it correctly — and one critical mistake that almost everyone makes that actually makes their site slower.
Lazy loading is a web performance technique that defers the loading of off-screen content until it's actually needed — specifically, until the user scrolls near it.
Without lazy loading: When a visitor opens your page, the browser immediately downloads every single image, video, and iframe on the page — including ones at the very bottom that the visitor may never scroll to. All of this downloading happens before the page feels interactive to the user.
With lazy loading: The browser only loads images and videos that are currently visible (or close to visible) in the viewport. As the user scrolls down, additional images load just in time — transparently, without the user noticing any delay.
The result: Your page's initial load is dramatically faster because the browser only has to download a fraction of the total media on the page before showing content to the user.
A concrete example
Imagine a WordPress blog post with 15 images. Without lazy loading, all 15 images download when the page loads — even though the visitor only sees the first 2 images above the fold. That might be 8MB of image data downloaded before the visitor reads a single word.
With lazy loading, only the first 2–3 visible images load immediately. The remaining 12 images download only as the user scrolls towards them. Initial page load might involve just 1.5MB of image data instead of 8MB — a massive speed improvement.
WordPress implements lazy loading via the HTML loading attribute on <img> tags:
<img src="image.jpg" loading="lazy" width="800" height="500" alt="Description">
When a browser sees loading="lazy", it knows not to download the image until it enters (or is close to entering) the visible viewport.
Browser support: The loading="lazy" attribute is supported by all modern browsers — Chrome, Firefox, Safari (15.4+), Edge, and Opera. It's a native HTML feature, not a JavaScript hack, which makes it lightweight and reliable.
For browsers that don't support it (very old browsers), the attribute is simply ignored and images load normally — it degrades gracefully with no negative consequences.
WordPress added native lazy loading support in version 5.5 (released August 2020). Since then, WordPress automatically adds loading="lazy" to:
the_post_thumbnail()wp_get_attachment_image()How to verify it's working:
<img> tagloading="lazy" in the attributesIf you see it, native lazy loading is active. If you don't see it on images that should have it, your theme may be outputting image HTML directly (bypassing WordPress's image functions) or an older plugin may be overriding the attribute.
Your LCP (Largest Contentful Paint) — one of Google's three Core Web Vitals ranking signals — is measured as the time it takes for the largest visible element above the fold to fully appear on screen. For most WordPress sites, this is the hero image at the top of the page.
If your hero image has loading="lazy", the browser intentionally delays loading it. The browser waits to see if you'll scroll first before downloading the image. This directly delays your LCP — hurting your Core Web Vitals score and your Google ranking.
The correct approach:
loading="eager" (or no loading attribute at all — eager is the default)loading="lazy"How WordPress handles this:
Since WordPress 5.9, WordPress is smart about this. It automatically skips adding loading="lazy" to the first image in the content on most themes — applying loading="eager" instead. However, this logic depends on your theme correctly using WordPress's image output functions.
To verify your hero image is loading correctly:
loading="lazy" — if you see it, that's a problemIf your hero image is incorrectly lazy loaded, add this to your theme's functions.php to force eager loading on the first image:
add_filter( 'wp_lazy_loading_enabled', function( $default, $tag_name, $context ) {
if ( 'the_content' === $context ) {
return $default;
}
return $default;
}, 10, 3 );
For theme-specific hero images, ensure the get_header_image_tag() or custom hero image output doesn't include loading="lazy".
While WordPress handles image lazy loading natively, there are other types of content that benefit from lazy loading — iframes, videos, comments, and widgets — that WordPress doesn't handle automatically.
YouTube embeds, Vimeo videos, Google Maps, and other iframes are often the heaviest elements on a page. A single YouTube embed loads several hundred kilobytes of JavaScript before the user even clicks play.
Method 1: Native iframe lazy loading
Modern browsers support loading="lazy" on iframes too. The block editor's embed blocks and some plugins add this automatically. Check by inspecting any embed element.
Method 2: Facade / click-to-load (better for performance)
Instead of loading the full embed on page load, display a preview image. The full embed only loads when the user clicks play. This is even more effective than standard lazy loading.
Install WP YouTube Lyte or use WP Rocket's "Replace YouTube iframes with a preview image" feature to implement facade loading for YouTube embeds.
WP Rocket extends lazy loading significantly:
LiteSpeed Cache includes excellent lazy loading:
If you're not using WP Rocket or LiteSpeed Cache, a3 Lazy Load (free) is a well-maintained dedicated lazy loading plugin:
CSS background images (set via background-image: url(...) in stylesheets) aren't handled by the native loading="lazy" attribute — that only works for <img> tags. Background images load immediately regardless of where they are on the page.
This matters for pages with hero sections using CSS backgrounds, section dividers with background images, and parallax effects.
Solutions:
WooCommerce product galleries, shop archive pages, and related products sections often contain dozens of product images. Lazy loading is especially valuable here.
For WooCommerce:
loading="lazy" in recent versionsIf product images aren't lazy loading, check:
After enabling lazy loading, measure your improvement:
Google PageSpeed Insights:
GTmetrix:
| Content Type | Native Support | Plugin Needed | Notes |
|---|---|---|---|
<img> tags in content | ✅ WordPress 5.5+ | No | Verify loading="lazy" is present |
| Featured images | ✅ WordPress 5.5+ | No | Check theme uses standard functions |
| Hero / above-fold image | ✅ WordPress 5.9+ | No | Must NOT be lazy loaded — verify |
| YouTube / video iframes | ❌ | Yes | Use WP Rocket or a3 Lazy Load | CSS background images | ❌ | Yes | WP Rocket or LiteSpeed Cache |
| Avatars | ✅ WordPress 5.5+ | No | Applied to comment avatars |
| WooCommerce images | ✅ Recent WC versions | No | Verify in inspector |
A: Yes. The loading="lazy" attribute is supported by Chrome for Android, Safari on iOS 15.4+, and all other major mobile browsers. In fact, lazy loading is especially impactful on mobile where connections are slower and every byte of initial page weight matters more.
A: Properly implemented lazy loading improves SEO by improving Core Web Vitals scores. The only way it can hurt SEO is if it's applied to your hero/LCP image, delaying its load. Googlebot also crawls JavaScript-executed lazy loads — but native loading="lazy" images are fully visible to Google's crawlers.
A: This warning often refers to images loaded by JavaScript or CSS background images, which aren't covered by native lazy loading. Check for carousel/slider images, CSS backgrounds, or images loaded by plugins that don't use standard WordPress image functions.
A: It can, if ads are image-based and users don't scroll to them. For AdSense or display advertising, verify your ad network's documentation on lazy loading compatibility. Most modern ad networks handle this correctly.
WordPress lazy loading is one of the most effective, lowest-effort performance improvements available. For most sites running WordPress 5.5 or later, it's already active — but verifying it's configured correctly (especially ensuring your hero image is NOT lazy loaded) is essential.
Extend native lazy loading to iframes and videos using WP Rocket, LiteSpeed Cache, or a dedicated plugin, and you'll see meaningful improvements in both page load time and Core Web Vitals scores.
Need help auditing your WordPress site's lazy loading configuration and Core Web Vitals performance? Our team handles exactly this.
Contact us today