By the ImageSEO team. Updated November 2026.
Quick answer: lazy loading images means the browser waits to download an image until the visitor scrolls near it. You switch it on with one HTML attribute, loading="lazy", and every major browser supports it. It saves data and speeds up long pages. But it has one rule you must not break: never lazy-load an image that is visible when the page first opens, especially the largest one (your hero or featured image). WordPress has added lazy loading by default since version 5.5. Since 6.3 it skips the first images on the page and gives the main image fetchpriority="high". So most WordPress sites only need to check that nothing overrides this.
A normal image starts downloading as soon as the browser reads the page, even if it sits far below the part of the page you can see. On a long article or a product grid, that can be dozens of files the visitor may never scroll to.
With lazy loading, the browser holds back images that are far from the screen and fetches them just before they come into view. The page’s first view needs fewer downloads, so it can finish sooner, and visitors who leave early never download the rest.
The browser decides how early “just before” is. Google’s web.dev team says Chrome starts loading a lazy image when it is about 1,250 px from the screen on fast connections and about 2,500 px on slower ones (3G or below). These distances are built into the browser; you can’t change them with the attribute. They are large on purpose, so the image is usually ready by the time someone scrolls to it.
Add loading="lazy" to the <img> tag, and always give the image a width and height:
<img src="team-photo.jpg"
alt="Five people around a table reviewing printed website mockups"
width="1200" height="800"
loading="lazy">
The width and height matter more with lazy loading, not less. They let the browser reserve the right amount of space before the file arrives, so text doesn’t jump when the image loads. web.dev recommends adding both attributes to every image.
A few details that cause problems:
<picture> and srcset, put loading="lazy" on the inner <img>. The browser still picks the right size; it just picks it later.<iframe loading="lazy"> works too, which is useful for embedded YouTube videos and maps further down a page.<img> and <iframe>, not on background-image. Google also doesn’t index images that only appear in CSS, so any image you want in Google Images should be a real <img> tag.loading="eager", both mean “load now”.| Attribute | Chrome | Edge | Safari | Firefox |
|---|---|---|---|---|
loading="lazy" on images |
77+ | 79+ | 15.4+ (iframes from 16.4) | 75+ (iframes from 121) |
fetchpriority="high" |
101+ | 101+ | 17.2+ | 132+ |
Source: caniuse.com, November 2026. Can I Use counts about 97% of browsers in use with full support for loading="lazy" and about 95% for fetchpriority. Older browsers ignore both attributes and load the image normally, so adding them never breaks a page.
Eager loading is the normal behavior: download now. Lazy loading is “download when needed”. Neither is better on its own; the right choice depends on where the image sits.
| Eager (default) | Lazy (loading="lazy") |
|
|---|---|---|
| When it downloads | Right away, with the page | When the visitor scrolls near it |
| Use it for | The hero or featured image, the logo, anything visible without scrolling | Images further down: article images after the first screen, galleries, product grids, comment avatars, embeds |
| Risk if used in the wrong place | Long pages download images nobody sees, wasting data | The main image appears late, so the page feels slow and scores worse on Largest Contentful Paint |
| Pair it with | fetchpriority="high" on the single most important image |
width and height so the layout doesn’t shift |
Good for images below the first screen, bad for images on it. The data supports both points.
Largest Contentful Paint (LCP) measures how long the biggest piece of content on the first screen takes to appear. On most pages that piece is an image. Google rates an LCP of 2.5 seconds or less as good. If that image is lazy-loaded, the browser has to finish laying out the page before it even knows the image is on screen, and only then starts the download.
When Google’s web.dev team studied this, they found:
That last result is the whole lesson: lazy-load what is out of sight, load the first view straight away. WordPress changed its own defaults because of this research, as the next sections show.
Not when you use the built-in attribute. Google’s Search Central guide on lazy-loaded content lists browser-level lazy loading for images and iframes as a supported method. It also lists the IntersectionObserver API and JavaScript libraries that load content when it enters the screen.
Problems start with methods that wait for the visitor to do something. Google says that Google Search does not interact with your page, so it does not scroll or click. If a script only swaps in the real image after a scroll event or a click, Googlebot may never see it. Older lazy-load scripts often put the real address in data-src and leave a placeholder in src; if that swap never runs for Googlebot, Google sees only the placeholder.
How to check: in Google Search Console, run the URL Inspection tool on a page, view the rendered HTML and confirm that each image’s real file is in the src attribute of its <img> tag. That is the check Google itself recommends.
There is also a speed angle. Google’s ranking systems use Core Web Vitals, including LCP. But Google says it still shows the most relevant content first, even when page experience is weak. A lazy-loaded hero won’t ruin a strong page, but it is an easy fix that also makes the page feel faster to real visitors.
WordPress core added lazy loading in 2020 and has changed it several times. If your site runs a current version, this is what it already does for you:
| WordPress version | What changed |
|---|---|
| 5.5 (2020) | Adds loading="lazy" to images in post content, excerpts, text widgets, avatars and images output by wp_get_attachment_image(), as long as the image has width and height attributes (WordPress fills these in for Media Library images). |
| 5.7 (2021) | Adds loading="lazy" to iframes (such as embedded videos) as well. |
| 5.9 (2022) | Stops lazy-loading the very first content image or iframe on the page, which is often the featured image. Controlled by the filter wp_omit_loading_attr_threshold, default 1. |
| 6.3 (2023) | Raises that default from 1 to 3, so the first three content images load straight away. Adds fetchpriority="high" to the image most likely to be the LCP image (the first large one, at least 50,000 pixels by default). Also covers images outside the post content, such as classic-theme header images. A single function, wp_get_loading_optimization_attributes(), now decides this and never gives one image both lazy and high. |
WordPress’s 6.3 developer note says adding fetchpriority="high" to the LCP image typically improves LCP by 5–10%.
WordPress has to guess which images are on the first screen, and the guess can be wrong. A theme with a large slider, a sidebar image above the content, or a layout where the first real image is the fourth one in the code can still end up with a lazy-loaded hero. That’s why it is worth checking your own pages (see below) instead of assuming.
For normal images and embeds, usually not; core handles them. A plugin is only worth it for things core doesn’t do:
If you do use a plugin, make sure only one system is lazy-loading. A plugin that adds its own JavaScript lazy loading on top of WordPress’s attribute can conflict with it and delay images, and if it relies on data-src, can hide them from Google. Check the plugin’s documentation to see whether it removes WordPress’s own attribute, then check the page source.
These snippets go in a small custom plugin or your child theme’s functions.php. Test on a staging copy first.
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
Rarely a good idea on long pages, but useful when a plugin handles lazy loading for you and you don’t want two systems running.
add_filter( 'wp_lazy_loading_enabled', function ( $default, $tag_name, $context ) {
// Keep lazy loading, except for images in widgets.
$widget_contexts = array( 'widget_text_content', 'widget_block_content' );
if ( 'img' === $tag_name && in_array( $context, $widget_contexts, true ) ) {
return false;
}
return $default;
}, 10, 3 );
// Do not lazy-load the first 4 content images (default since WordPress 6.3: 3).
add_filter( 'wp_omit_loading_attr_threshold', function () {
return 4;
} );
Raise it for grid layouts where the first screen shows many images; lower it to 1 if only one image is ever visible before scrolling.
echo wp_get_attachment_image( $image_id, 'full', false, array(
'loading' => false, // no loading attribute: load now
'fetchpriority' => 'high', // ask the browser to fetch it early
) );
Many older tutorials (including an earlier version of this page) add a wp_img_tag_add_loading_attr filter to skip the first image. WordPress has done this by itself since version 5.9, and since 6.3 it skips the first three. The old filter still works, but it is usually not needed, so you can remove it after testing.
fetchpriority="high" should be added.loading and fetchpriority attributes.loading="lazy" on it, ideally fetchpriority="high", and loading="lazy" on images further down.src.loading="lazy"fetchpriority="high"loading="lazy"width and height set<img> tags, not CSS backgroundssrcLazy loading changes when an image downloads, not what Google understands about it. A lazy-loaded image with an empty alt attribute and a file name like IMG_4821.jpg tells Google as little as an eager one. Google’s image guidelines point to the text around the image, the alt text and, as a lighter clue, the file name.
ImageSEO is a WordPress plugin for that part of the job. It doesn’t lazy-load or compress images, so it works alongside WordPress core or your performance plugin:
It works with JPG, PNG and WebP files, and the free plan covers 10 images a month (see pricing). To see which images on a page are missing alt text first, run the free image SEO audit or try the free alt text generator.
Related guides: best image size for websites · WebP vs AVIF vs JPEG XL · WordPress image optimization plugins · featured image size for bloggers · alt text for SEO · the complete image SEO guide.
Images that the browser downloads only when the visitor scrolls close to them, instead of all at once when the page opens. You enable it with loading="lazy" on the image tag.
Add loading="lazy" plus width and height to each <img> below the first screen. No JavaScript is needed in current browsers.
Good when it is limited to images below the first screen and uses the built-in attribute, which Google supports. Bad when it delays the main image (slower LCP) or relies on scrolling or clicks that Googlebot never makes.
Yes, if the real image file ends up in the src attribute without any user action. Check with the URL Inspection tool in Search Console.
Yes, since WordPress 5.5. Since 6.3 it skips the first three content images and adds fetchpriority="high" to the likely LCP image.
Add add_filter( 'wp_lazy_loading_enabled', '__return_false' ); to a custom plugin or child theme. Usually it is better to keep it on and only exclude the images on the first screen.
No. It is visible on every page without scrolling, so it should load right away.
An attribute that tells the browser this image is more important, so it starts downloading it earlier. Use it on the one most important image on the first screen, never together with loading="lazy".