Lazy Loading Images: How It Works, When It Hurts, and What WordPress Does for You (2026)

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.

What lazy loading images means

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.

How to lazy load images in HTML

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:

  • Responsive images: with <picture> and srcset, put loading="lazy" on the inner <img>. The browser still picks the right size; it just picks it later.
  • Iframes: <iframe loading="lazy"> works too, which is useful for embedded YouTube videos and maps further down a page.
  • CSS background images: the attribute only works on <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.
  • The default is eager: leaving the attribute out, or writing loading="eager", both mean “load now”.

Browser support

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.

Lazy loading vs eager loading

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

Is lazy loading good or bad?

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:

  • In 2021, built-in lazy loading was used on 29% of websites, and 84% of those sites ran WordPress.
  • In real-user data, the typical page using lazy loading had an LCP of 3,546 ms (75th percentile of real visits), against 2,922 ms for pages without it. The team calls this a correlation, not proof, because many other things differ between those sites.
  • In a controlled test on a WordPress blog archive (desktop), turning lazy loading off for every image made LCP 13% faster (2,029 ms to 1,759 ms), but loaded far more image data.
  • Keeping lazy loading only for images below the first screen gave the best of both: LCP of 1,749 ms, about 14% faster than the default, with the same data savings as full lazy loading.

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.

Does lazy loading hurt SEO?

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.

How WordPress lazy loads images

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.

Do you need a lazy load plugin in WordPress?

For normal images and embeds, usually not; core handles them. A plugin is only worth it for things core doesn’t do:

  • CSS background images (common in page builders and hero sections), which the HTML attribute can’t lazy-load.
  • Video embeds: some performance plugins replace a YouTube iframe with a light preview image until the visitor clicks play, which can save more than lazy loading the iframe.
  • Exclusions you control: a setting to mark specific images (your logo, a hero in a slider) as “never lazy”, when WordPress’s guess is wrong for your theme.
  • Images your theme or page builder outputs without going through WordPress’s image functions, which core’s filters never see.

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.

How to turn off or adjust lazy loading in WordPress

These snippets go in a small custom plugin or your child theme’s functions.php. Test on a staging copy first.

Turn lazy loading off everywhere

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.

Turn it off for one place only

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 );

Load more (or fewer) images straight away

// 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.

Mark one image as the priority image in a theme template

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.

How to check whether your main image is lazy-loaded

  • PageSpeed Insights or Lighthouse: run your page and open the LCP insights. Lighthouse checks the LCP request and tells you if the image was lazy-loaded and whether fetchpriority="high" should be added.
  • Chrome DevTools: open the Performance panel and reload the page. It names the LCP element; inspect it and look at its loading and fetchpriority attributes.
  • Page source: view the source of a post and search for your featured image’s file name. You want no loading="lazy" on it, ideally fetchpriority="high", and loading="lazy" on images further down.
  • Search Console URL Inspection: confirm Google’s rendered HTML has the real image file in src.
  • Check on a phone too. The first screen on mobile is shorter, so an image that is visible on desktop may be below the first screen on a phone, and the reverse can happen in some layouts.

Lazy loading checklist

  1. Hero, featured image and logo: no loading="lazy"
  2. The single largest image on the first screen: fetchpriority="high"
  3. Every image below the first screen: loading="lazy"
  4. Every image: width and height set
  5. Images you want in Google Images: real <img> tags, not CSS backgrounds
  6. Only one lazy-loading system active (WordPress core or a plugin, not both)
  7. Rendered HTML checked in Search Console: real file in src
  8. Alt text on every meaningful image

Lazy loading doesn’t replace alt text

Lazy 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:

  • Alt text on upload: once your ImageSEO account is connected, it writes alt text with AI into the Media Library field. This is on by default.
  • File names: it renames uploads to descriptive names and updates the image URLs in your posts. This is on by default too, and it doesn’t add redirects for old image URLs, so think before renaming images that already get traffic.
  • Bulk: it can process your existing library. The default is every image, which replaces alt text you already wrote; choose “only images without alt text” to keep yours.

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.

FAQ

What are lazy load images?

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.

How do I lazy load images in HTML?

Add loading="lazy" plus width and height to each <img> below the first screen. No JavaScript is needed in current browsers.

Is lazy loading good or bad for SEO?

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.

Does Google index lazy-loaded images?

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.

Does WordPress lazy load images by default?

Yes, since WordPress 5.5. Since 6.3 it skips the first three content images and adds fetchpriority="high" to the likely LCP image.

How do I turn off lazy loading in WordPress?

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.

Should I lazy load my logo?

No. It is visible on every page without scrolling, so it should load right away.

What is fetchpriority=”high”?

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".

Our SEO Tool will grow your traffic

Why have you neglected images search engine optimization for so long ?

Try it for free
Days Launch Dofollow.Tools Fazier Launchpadly Starter Best The One Startup Twelve Tools yo.directory
Featured on Days Launch Featured on findly.tools Featured project on MEDIAPRONET Featured on NewTool.site Featured on Starter Best ImageSEO - Featured on Startup Fame Stork Verified — stork.ai AI tools directory Featured on The One Startup Featured on ToolPilot