Illustration of WordPress images loading=

Lazy Loading in WordPress: 7 Safe Checks to Fix Image Loading

WordPress lazy loading usually works automatically, but the wrong image, plugin setting, or theme markup can still hurt performance. This guide shows how to verify it and fix common problems safely.

Lazy loading in WordPress normally delays images and other media until they are close to the visitor’s screen. That reduces the amount of data needed when a page first opens. On a current WordPress site, image lazy loading is often added automatically through core, but themes, page builders, optimization plugins, and custom HTML can change the result.

If images are loading too early, appearing late, or the main image is being delayed, do not immediately install another performance plugin. First identify which image is affected, confirm whether lazy loading is present, and then change only the layer responsible.

This guide explains how WordPress lazy loading works, how to check it, and how to correct common implementation problems without damaging image quality or layout stability.

What WordPress lazy loading actually does

Lazy loading adds a browser hint to images that are not immediately needed. In HTML, the usual form is:

<img src="example.jpg" loading="lazy" alt="Example">

The browser can defer that image until it approaches the viewport. Images visible when the page opens, especially a hero or banner image, generally should load immediately because they may contribute to the page’s largest visible element.

WordPress can add loading="lazy" to suitable images generated through standard content functions. The exact behavior can vary with WordPress version, theme code, image size, block type, and plugins. A manually coded image, background image, slider, or page-builder element may not follow the same path.

Lazy loading is not image compression. It does not reduce the file’s dimensions or byte size. It only changes when the browser requests the resource. You may need separate image optimization, responsive image sizes, caching, or format conversion for a complete performance improvement. See the related WordPress slow-loading diagnosis guide if the site remains slow after this check.

First identify the exact symptom

“Lazy loading is not working” can describe several different problems. Reproduce the issue in a private browser window and record the page URL, device type, and whether you are logged in.

  • Images load immediately: the image may be above the fold, marked eager, inserted as a CSS background, or altered by a plugin.
  • Images appear late or flash blank: the browser may be waiting for a slow image, a lazy-load script may be failing, or the image has no reliable dimensions.
  • The hero image loads too slowly: it may have been incorrectly marked lazy, oversized, or delayed by a performance plugin.
  • Images never appear: the source URL, JavaScript, cache, CDN, or optimization layer may be broken. This is not automatically a lazy-loading problem.
  • Performance testing reports a lazy-load warning: the test may be identifying an above-the-fold image that should not be deferred, rather than asking you to lazy-load every image.

How to check lazy loading safely

1. Test while logged out

Open the page in a private window or a different browser. Logged-in visitors can receive an uncached page, administrative toolbar assets, or different optimization behavior. Test on both a desktop-sized and narrow viewport.

2. Inspect the image markup

Right-click the affected image and choose the browser’s inspection option. The exact wording varies by browser. Look for the resulting <img> element and check for:

  • loading="lazy" on an image that is below the initial viewport.
  • loading="eager" or fetchpriority="high" on an important above-the-fold image.
  • A real width and height, or another method that reserves its display space.
  • A usable src or responsive srcset URL.

If the image is a CSS background, there may be no image element to inspect. In that case, check the theme or page-builder output and use the browser’s Network panel to see when the image request begins.

3. Watch the Network panel

Diagram showing above-the-fold and below-the-fold images loading=

Open developer tools, select the Network tab, reload the page, and filter for images if the browser provides that filter. Compare the request timing with the image’s position on the page. A below-the-fold image that is requested immediately may be intentionally preloaded, inserted by JavaScript, or excluded from lazy loading. A visible image requested only after scrolling may be incorrectly deferred.

4. Compare an uncached request

Performance plugins, host caching, CDNs, and optimization services can rewrite HTML or delay scripts. Purge the relevant cache only after noting the current settings, then test again in a private window. Avoid repeatedly purging production caches while visitors are active; use a staging copy when available.

Common causes and the least-invasive fixes

The wrong image is lazy-loaded

The most important image is usually the one visible first, such as a hero image or featured image at the top of the article. If it is marked loading="lazy", remove the lazy behavior for that specific image through the theme, block, or page-builder control that generated it. Prefer a per-image or per-template change rather than disabling lazy loading sitewide.

Do not add loading="eager" to every image. That can cause many large files to download together and may make the initial page heavier.

Lazy loading is missing from content images

Confirm that the image is actually below the first viewport and that the HTML is generated by WordPress rather than custom JavaScript or a CSS background. If core does not add the attribute, inspect theme and plugin settings before adding code. An optimization plugin may have its own lazy-load feature, but enabling two systems can create duplicate processing or unexpected exclusions.

Make one change at a time, purge the correct cache, and inspect the final page source or DOM again. The output delivered to visitors matters more than the editor screen.

A plugin is replacing or delaying images

Image optimization, caching, gallery, slider, and page-builder plugins can rewrite src, srcset, or data attributes. Temporarily disable one suspected feature on a staging site, or use a controlled conflict test if the site is small and a maintenance window is available. Keep a backup and document each change.

If a plugin has an exclusion field, exclude only the affected image, selector, template, or above-the-fold area. The exact setting name varies by plugin version, so confirm its documentation rather than guessing.

The theme uses background images

CSS background images are not handled exactly like normal content images. A hero background may be requested as soon as its stylesheet applies, while a background lower on the page may depend on a JavaScript lazy-load library. Check the theme’s documentation or template code before modifying it. Changing a production theme file directly is risky because updates can overwrite the change; use a child theme or a maintainable customization method.

Images shift the layout while loading

Lazy loading can expose layout problems when the browser does not know an image’s intended dimensions. Use correctly sized WordPress image variants and preserve the displayed aspect ratio. The image element should have dimensions or a container that reserves space before the file arrives. This is different from making the image load sooner.

When to disable lazy loading for one image

Disable or bypass lazy loading selectively when an image is:

Illustration of diagnosing deferred images on a WordPress webpage
  • Visible immediately on the initial page view.
  • The primary hero or featured image that affects the largest visible content.
  • Needed for a critical visual or functional element above the fold.
  • Being delayed by a plugin even though it should appear immediately.

Keep lazy loading for ordinary article images, gallery items, and media well below the initial viewport. If a performance tool recommends excluding an image, verify its position on a real mobile device before changing it. Automated tests can report a problem because an image is important, not because every other image needs eager loading.

Safe troubleshooting order

  1. Back up first: save a current database and file backup, or create a staging copy.
  2. Record the symptom: note the URL, affected image, device, browser, and whether the issue occurs while logged out.
  3. Inspect the delivered HTML: check loading, src, srcset, dimensions, and whether the image is a background.
  4. Check plugin settings: review image, cache, performance, gallery, slider, and page-builder features for lazy loading or exclusions.
  5. Purge and retest: clear the relevant page, CDN, and browser cache only after recording the configuration.
  6. Test for a conflict: use staging or a controlled troubleshooting process to isolate one plugin or the active theme.
  7. Change the narrowest thing: exclude the hero image or correct the generating template instead of disabling lazy loading everywhere.
  8. Verify on real devices: test a fresh logged-out session, scroll through the page, and confirm that images appear without broken placeholders or layout jumps.

Changing wp-config.php, theme PHP files, server rules, or database values is not a first step for this problem. Those changes can affect the entire site and should be made only with a tested backup and a clear rollback plan. WordPress’s official documentation is useful when confirming core behavior and version-specific details.

How to verify the fix

After making a change, do not rely only on a single score. Verify the actual behavior:

  • Reload the page while logged out with a clean or bypassed browser cache.
  • Confirm the hero image begins loading promptly and is not unnecessarily marked lazy.
  • Scroll steadily through the page and confirm lower images load as they approach the viewport.
  • Check that no image is permanently blank, broken, or replaced by an incorrect size.
  • Review the Network panel for failed image requests and unexpected duplicate downloads.
  • Repeat the test on a mobile connection or device when mobile visitors are important.

If the page is still slow, the cause may be oversized images, slow hosting, render-blocking scripts, third-party resources, or a cache configuration rather than lazy loading. The WordPress performance plugin guide can help you evaluate optimization tools without stacking overlapping features.

Questions that often decide the diagnosis

Should every WordPress image use lazy loading?

No. Images near the top of the page should usually be available promptly. Lazy loading is most useful for media that visitors must scroll to see. Applying it to every image can delay important content.

Why does the HTML contain lazy loading but the image loads immediately?

The browser may decide that the image is close enough to the viewport, or another resource such as a preload, script, or CSS background may be loading the same file. Inspect the Network panel and search the page source for duplicate URLs.

Why does a lazy-loaded image stay blank after scrolling?

Check the final image URL, browser console errors, JavaScript optimization settings, lazy-load exclusions, and CDN responses. Temporarily disabling the suspected optimization feature on staging can show whether it is rewriting the image incorrectly.

Can I solve this by installing another lazy-loading plugin?

Usually not as a first step. WordPress core, themes, caching plugins, image tools, and page builders may already be involved. Adding another layer can create competing scripts. Identify the current source of the markup before choosing a replacement.

When professional help is safer

Ask for assistance if the problem affects a high-traffic landing page, requires editing a custom theme, involves a CDN or page cache you cannot safely bypass, or causes images to disappear for visitors. A controlled diagnosis can preserve the current configuration while isolating the responsible layer. WP Fix It’s WordPress Speed & Performance service is an option when the issue is part of a broader performance problem.