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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For most sites, you do not need to turn on a separate lazy-loading switch. WordPress 5.5 and later adds the native loading="lazy" attribute to eligible images, and WordPress 5.7 added the same support for eligible iframes. The browser then waits to fetch media until it is close to entering the viewport.

The safest setup is to let WordPress defer below-the-fold media while keeping the logo, hero image, featured image, or other above-the-fold Largest Contentful Paint (LCP) candidate eager. Give every image reliable dimensions, verify the final rendered HTML, and add a plugin only when you need controls that core does not provide.

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

What lazy loading does in WordPress

Lazy loading changes when a browser requests an image or iframe. Instead of downloading every media file as soon as the document is parsed, the browser can postpone a deferred element until it is near the visible viewport. A page with many below-the-fold images therefore sends fewer early requests, which can reduce initial bandwidth, mobile data use, and battery consumption. WordPress documentation describes the feature in those terms rather than promising a fixed percentage improvement.

Lazy loading is not an image-compression technique. It does not reduce the file size of a JPEG, WebP, or AVIF, and it does not replace responsive images, caching, or good hosting. It changes the request schedule. Deferring an image that a visitor cannot see is usually beneficial; deferring the image that defines the first visible content can make the page feel slower.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

The browser is the final decision-maker. WordPress emits an HTML hint, but browser engines choose the exact prefetch distance and may ignore the hint in unusual conditions. Performance audits should therefore examine requests and paint timings, not just whether an attribute appears in markup.

Which WordPress versions support it?

WordPress version Native behavior What it means for a site owner
5.5 (2020) Lazy loading for eligible images was introduced by default through the native HTML loading attribute. Ordinary images generated by supported WordPress paths can be deferred without a plugin.
5.7 (2021) Core enabled the same mechanism for eligible iframe elements. Many embedded frames, including common media and content embeds, can be deferred.
5.9 (2021) Core began omitting lazy loading from the first content image or iframe by default. The first content element gets an earlier request, but a custom theme can still identify the wrong element as the first one.

Update WordPress, the active theme, and plugins through your normal maintenance process before troubleshooting. A current site is more likely to use the core image functions and filters on which native lazy loading depends. Test updates on a staging copy when your site has custom templates or a page builder.

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

Enable and verify native lazy loading

There is normally no dashboard checkbox. Use this workflow instead:

  1. Confirm the WordPress version. In the administration area, open Dashboard → Updates. Run available core, theme, and plugin updates, then clear any page-cache or CDN cache that serves old HTML.
  2. Add an image through a supported path. Insert it with the Media Library and block editor, or render an attachment with a standard function such as wp_get_attachment_image(). Images in post content, excerpts, text widgets, avatars, and attachment-image output are among the contexts core handles.
  3. Publish or preview the page. Do not inspect only the editor markup. Optimization plugins, page builders, themes, and caches can rewrite attributes before the browser receives them.
  4. Inspect the rendered element. Open browser developer tools, select the image in the Elements panel, and check for loading="lazy". View-source is also useful for seeing the original server response. A normal responsive image should commonly include intrinsic width and height, plus srcset and sizes when WordPress can generate them.
  5. Inspect the first viewport separately. Find the image or iframe that is actually visible when the page opens. WordPress 5.9 skips the first content image or iframe by default, but headers, sliders, banners, custom HTML, and page-builder wrappers can make the real LCP element different.
  6. Run a performance audit. Confirm that below-the-fold media is not downloaded immediately and that the LCP candidate is requested early. Use a representative mobile profile and a cleared cache, then repeat after the page has loaded.

The rendered HTML is the source of truth. A plugin dashboard may say lazy loading is enabled while a theme or later optimization layer removes the attribute, or it may report an option that applies only to images generated by that plugin.

How WordPress chooses elements to defer

Core’s wp_lazy_loading_enabled() function returns true by default for both img and iframe tags in supported contexts. An iframe still needs a source and dimensions before the loading attribute can be added. A hand-written element with incomplete markup may therefore behave differently from an iframe created by a standard embed routine.

For images, WordPress can add the attribute in post content, excerpts, text widgets, avatars, and attachment-image output. The exact result depends on how the markup was produced. Custom theme code that prints an <img> tag directly, a page builder that replaces the tag, or an optimization layer that rewrites HTML can bypass or undo core behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Dimensions are important even when an image is lazy-loaded. The browser uses width and height to reserve the correct aspect ratio before the file arrives. That reservation prevents surrounding text and controls from jumping when the image is decoded. WordPress’s standard image functions normally provide those dimensions; custom markup must provide them deliberately.

Responsive attributes solve a different problem. srcset and sizes help the browser choose an appropriate file for the device, while loading="lazy" controls when the request begins. Use both when possible rather than relying on lazy loading to compensate for oversized files.

Keep the hero and LCP image eager

The first visible image should normally start loading immediately. Typical examples are a masthead logo, hero photograph, article featured image, product image at the top of a page, or a banner that occupies the opening viewport. If that asset is deferred, the browser may wait for layout or a near-viewport threshold before requesting it, delaying the page’s main visual.

Do not assume the first image in the source is the LCP candidate. A navigation logo may appear first in the HTML while a large article image is painted later. Conversely, a decorative hero background may be the visual that matters even though it is not an img element and is not governed by the image filter. Use the browser’s performance panel or a Core Web Vitals audit to identify the actual LCP element for each important template.

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

Once identified, remove lazy loading from that element or set it to eager. Do not apply contradictory instructions such as marking the same image both lazy and high priority; WordPress optimization guidance treats those hints as conflicting. Test the result on a realistic mobile connection because an eager request that is harmless on a fast desktop connection can compete with critical CSS and fonts on a slower one.

Control exceptions with WordPress filters

Most sites should leave the core default intact and change only known exceptions. Put custom code in a site-specific plugin or a child theme rather than editing WordPress core. After adding a filter, inspect the final HTML and check hook priority if another plugin changes the same attribute later.

Disable the rule for a rendering context

Use wp_lazy_loading_enabled when an entire tag and rendering context should not receive lazy loading:

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
add_filter(
    'wp_lazy_loading_enabled',
    function ( $default, $tag_name, $context ) {
        if ( 'img' === $tag_name && 'wp_get_attachment_image' === $context ) {
            return false;
        }
        return $default;
    },
    10,
    3
);

This example disables the default for attachment images generated through wp_get_attachment_image. Narrow the condition to the template or context that needs it; disabling the rule globally can cause every image to download during the initial page load.

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

Set a particular content image to eager

For an image in post content, use the per-tag filter and return eager for the known hero, or return false to omit the attribute entirely. A practical condition should identify the intended markup reliably, such as a distinctive class or data attribute added by the template:

add_filter(
    'wp_img_tag_add_loading_attr',
    function ( $value, $image, $context ) {
        if ( false !== strpos( $image, 'article-hero' ) ) {
            return 'eager';
        }
        return $value;
    },
    10,
    3
);

Use a stable selector rather than matching a filename that may change when media is regenerated. If the filter appears ineffective, verify that the image is actually passing through the content-image path and that a later cache or optimization step is not rewriting it.

Pass the attribute when generating an attachment image

Code that calls wp_get_attachment_image() can provide an explicit loading value in its attributes:

echo wp_get_attachment_image(
    $attachment_id,
    'large',
    false,
    array( 'loading' => 'eager' )
);

This is useful for a template’s known above-the-fold image. Keep the standard function so WordPress can continue to add dimensions, responsive sources, and other accessibility-related attributes.

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

When a lazy-loading plugin is justified

Native core behavior covers ordinary images and many iframes. A plugin becomes useful when the site needs controls outside that scope:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  • lazy loading for HTML5 video elements or complex video players;
  • a custom viewport threshold that requests media earlier or later than the browser’s native behavior;
  • blurred, low-quality, dominant-color, or other placeholder strategies;
  • large exclusion lists managed by editors instead of code;
  • restoration of original sources after a JavaScript-based rewrite;
  • a no-JavaScript fallback for a particular media workflow.

The WordPress.org listing for Smart LazyLoad documents these kinds of capabilities and states a requirement of WordPress 5.8 or higher. Treat that requirement as specific to that plugin, not as a requirement for WordPress’s native feature.

Capability WordPress core Specialized plugin
Images generated by standard WordPress paths Supported automatically from 5.5 onward. Usually supported, but may duplicate core behavior.
Eligible iframes Supported from 5.7 onward when source and dimensions are present. May add handling for embeds core does not recognize.
HTML5 video and player-specific logic Not a general native lazy-loading workflow. Often available, depending on the player.
Above-the-fold exclusion rules First content image or iframe is skipped by default from 5.9; finer rules require code or template changes. Often available through settings or exclusion lists.
Thresholds and placeholders Uses native browser behavior without a WordPress dashboard for custom thresholds or placeholder designs. May provide both, at the cost of extra configuration or JavaScript.
Compatibility Part of WordPress core and the browser standard. Must be checked against the theme, page builder, cache, CDN, and other optimization plugins.

Do not activate multiple systems that all rewrite src, srcset, or loading attributes without testing. Duplicate lazy loaders can leave placeholder URLs in the final markup, defer an LCP image, or add JavaScript that costs more than the requests it saves.

Prevent layout shifts while media is deferred

A deferred image still occupies space. Include matching width and height attributes, preserve the source aspect ratio, and avoid CSS that collapses the container until the image arrives. Standard WordPress image functions are preferable to manually assembled tags because they normally include intrinsic dimensions and responsive sources.

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

For responsive designs, let the image scale with CSS while retaining its intrinsic ratio. A common pattern is to set the image’s maximum width to its container width and its height to auto; the important point is that the browser knows the ratio before decoding the file. For art-directed crops, reserve the dimensions of the actual crop used in that breakpoint rather than the dimensions of an unrelated original.

Iframes need the same treatment. Give an embedded frame a width and height, or reserve its aspect ratio with a stable container. A YouTube or other video iframe may be deferred successfully, but the player can still load substantial scripts after the frame enters view. If the player remains heavy, a facade or a video-focused plugin may be more appropriate than changing the image lazy-loading setting.

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

Troubleshoot common failures

No loading="lazy" appears

  • Check whether the element is an image or iframe generated through a WordPress-supported function.
  • Confirm it has usable dimensions and a source.
  • Inspect the server response and the live DOM; a theme, page builder, optimization plugin, or cache layer may have replaced or stripped the attribute.
  • Check whether the element is intentionally the first content image or iframe and was excluded by the 5.9 behavior.

Do not add a second plugin merely because one editor view lacks the attribute. Verify the public page first.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

The hero image loads slowly

Identify the LCP candidate, then set that specific image to eager or exclude it from the lazy-loading rule. Check whether a slider, CSS background, responsive image choice, or JavaScript insertion is delaying the request. Keep the file appropriately sized; eager loading cannot fix an oversized or poorly encoded image.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

The page jumps while scrolling

Add reliable width and height values, preserve the aspect ratio, and ensure the placeholder and final image use the same box dimensions. Check iframe containers as well as images. A loading attribute without reserved space does not prevent cumulative layout shift.

An embedded video is still heavy

Core iframe lazy loading controls when the frame request begins, not everything the player does afterward. A custom embed may not pass through the iframe path, and an HTML5 video element is a separate case. Consider a lightweight facade, a specialized plugin, or a player-specific configuration after measuring the actual requests.

A filter has no effect

Inspect the final HTML, confirm the filter name and accepted arguments for your WordPress version, and check whether another callback runs later at a higher priority. Make sure the markup is being generated in the context your condition expects. Clear page, object, CDN, and browser caches after changing PHP code.

A repeatable performance-checking routine

  1. Record the page’s current LCP, cumulative layout shift, and initial media requests on a representative mobile profile.
  2. Inspect the first viewport and label each media element as critical, near-fold, or below-fold.
  3. Verify that critical media is eager and has an appropriate responsive source.
  4. Verify that below-fold images and eligible iframes carry the lazy attribute and dimensions.
  5. Scroll through the page and watch for late layout movement, blank placeholders, broken sources, or player errors.
  6. Repeat with caches warmed and cold, because cache layers can change the HTML and request order.
  7. Only then adjust a filter or add a plugin, and retest every important template rather than a single page.

Practical configuration for most sites

For a standard WordPress site, update to a maintained version, use WordPress’s image functions, keep intrinsic dimensions and responsive attributes, and leave native lazy loading enabled. Exclude the actual above-the-fold LCP image when testing shows it is deferred, while allowing ordinary below-the-fold images and supported iframes to remain lazy. Add custom filters only for documented template exceptions. Choose a plugin when the site genuinely needs video handling, custom thresholds, placeholders, source restoration, or editor-managed exclusions, and verify that its JavaScript does not conflict with existing optimization layers.

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

The result to aim for is not “lazy loading everywhere.” It is an early, stable first viewport followed by on-demand media as the visitor moves through the page.

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.