Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For most WordPress sites, you do not need a plugin to enable image lazy loading. WordPress has added the native HTML loading="lazy" attribute to eligible image markup since version 5.5. Verify that your rendered images include the attribute and explicit dimensions, then exclude any hero or other above-the-fold image that is likely to be the page’s Largest Contentful Paint (LCP) element.

What WordPress lazy loading does

Lazy loading tells a browser to postpone downloading an image until it is close to the visible viewport. That can avoid fetching images a visitor never scrolls to. WordPress 5.5 introduced this behavior by adding the native loading attribute to eligible img elements. Browsers that do not support the attribute simply ignore it, so it is progressive enhancement.

WordPress’s original implementation also relied on width and height attributes. Those dimensions let the browser reserve the correct aspect ratio before the file arrives, reducing layout shifts.

Verify that native lazy loading is working

  1. Open a published page that contains several images.
  2. Right-click an image and choose Inspect (or view the page source).
  3. Find an image well below the first viewport. Its rendered tag should contain loading="lazy", along with explicit width and height values, for example:
    <img src="..." width="1200" height="800" loading="lazy">
  4. Check the first viewport separately. Do not assume that the first content image, logo, or featured image has the same performance role on every theme.

If the attribute is present on below-the-fold images, native lazy loading is already enabled. Adding a second lazy-loading plugin can create conflicting markup or filters, so inspect the output before installing or configuring another optimizer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep hero and LCP images out of lazy loading

An image visible immediately—especially a hero, banner, or featured image that becomes the page’s LCP element—should generally be fetched promptly. Delaying it can make the main content appear later, and WordPress core refined its loading behavior in 2021 specifically to reduce this risk.

How to make the exception

  • Inspect the actual page at the target viewport size rather than treating every first image as above the fold.
  • Identify whether the theme or a plugin adds the loading attribute.
  • Remove lazy loading only from the image that must load immediately; keep it on genuinely below-the-fold images.
  • Recheck the rendered HTML and the page’s initial loading behavior after changing the setting.

Control lazy loading with WordPress hooks

Most sites should rely on core defaults. Use a hook when a custom theme or plugin needs a specific exception, and test the final HTML after each change.

Change one image’s loading attribute

wp_img_tag_add_loading_attr filters the value WordPress adds to an image tag. Returning false or an empty string omits the attribute, which can be appropriate for an above-the-fold logo or featured image.

add_filter( 'wp_img_tag_add_loading_attr', function ( $value, $image, $context ) {
    if ( $context === 'wp-post-image' ) {
        return false;
    }
    return $value;
}, 10, 3 );

Use a narrowly targeted condition that matches your theme’s context; do not disable lazy loading for every image unless you have a documented reason.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable or disable it by tag and context

wp_lazy_loading_enabled() determines whether WordPress adds a loading attribute for a tag and context. Core enables it for img and iframe by default. This is a broad control, so a global change can affect more content than intended.

Use the current loading-optimization API

Since WordPress 6.4, more loading decisions are centralized in wp_get_loading_optimization_attributes(). It coordinates attributes such as loading, fetchpriority, and decoding, while preserving attributes that are already present rather than blindly overwriting them. The older wp_get_loading_attr_default() function is deprecated in favor of this API.

Native WordPress versus a plugin or theme setting

Option Best use What to check
WordPress core defaults Standard content images on current WordPress versions Rendered markup includes loading="lazy" and dimensions
Theme-level control Custom rules for hero, header, or LCP images The theme’s filters do not delay the initial-viewport image
Plugin control A plugin already managing image markup or performance settings It does not duplicate or conflict with core and theme filters

No paid product is required to turn on native lazy loading. A plugin may add broader image optimization features, but the supplied WordPress material does not establish one universal plugin configuration for every theme.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot missing or incorrect lazy loading

There is no loading attribute

  • Confirm the site runs WordPress 5.5 or newer.
  • Inspect the final HTML, not only the editor view; a theme or page builder may generate the markup.
  • Check whether a theme or plugin removes the attribute through a filter.
  • Look for custom image HTML that lacks the dimensions and processing paths used by core.

The hero image is loading too slowly

Remove lazy loading for that specific image and review any optimization plugin or theme filter that may re-add it. WordPress 6.4’s loading-optimization API can also coordinate a prompt-loading treatment when custom logic correctly identifies the header or likely LCP context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The page jumps while images load

Add accurate width and height attributes (or otherwise preserve the image’s aspect ratio) so the browser can reserve space before downloading the file.

Best Value
BAZIC Products Take Along Large Print Word Finds Puzzle Book, 2 Titles
  • Offer contains ONLY 2 titles regardless of the order quantity placed for this listing. Set of volumes may vary. Ordering in multiples will not change the volume received. Image is meant to display the type of book you will be receiving only.
  • BRAIN TEASING. Perfect Puzzle Book for all ages to learn. Enjoy puzzles, maze, word search, or crosswords! This puzzle book is ideal for people on the go and will provide hours of entertainment.
  • FUN & CHALLENGING. Exercise your brains long-term memory, working memory, executive functioning, attention to detail, multitasking, and processing speed. Perfect gifting item for those who love word search puzzles!
  • RELAX, RECHARGE, & REFOCUS. The word find puzzle book offers an enjoyable challenge for all, from beginners to experts. Ideal for learning, practicing, and having fun time for various users.
  • OFFICIALLY LICENSED. High-resolution printing. Perfect for family activities, classroom learning, or travel. Provide an engaging, educational experience with every page, making it both fun and meaningful.

Several tools are changing the same tags

Temporarily disable overlapping lazy-load features, then inspect the output with one system enabled at a time. Keep the configuration that leaves below-the-fold images lazy while allowing the initial-viewport image to load promptly.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.