Lazy Loading and Responsive Images in WordPress, Explained Simply

How lazy loading and responsive images (srcset) work in WordPress, which images to lazy-load, how to check your hero image and fixes for common problems.

Lazy loading and responsive images in WordPress guide cover with a code icon

Table of Contents

Lazy loading delays images until a visitor scrolls near them, and responsive images (srcset) let the browser download a smaller file on small screens. WordPress does both automatically: it has added srcset to images since version 4.4, native lazy loading since 5.5, and fetchpriority for the main image since 6.3. Your job is to upload images large enough for the biggest display size but not huge, make sure the first visible image is not lazy-loaded, and avoid plugins or page builders that break these defaults.

Key takeaways
  • Lazy-load everything below the fold, never the hero image.
  • srcset lets phones download small files and big screens get sharp ones.
  • WordPress creates several sizes of every image you upload.
  • Background images set in CSS skip both features, so use them carefully.
  • Upload sensible sizes with the free Image Compressor.

One page, two very different downloads

Imagine two visitors opening the same blog post at the same moment: one on a 27-inch monitor in an office in Gulshan, one on a budget Android phone on a bus to Mymensingh. Without responsive images, both download the same 1920-pixel images, and the phone user waits and pays for data they never see. Without lazy loading, both download all 25 images in the post, even though most people stop reading halfway.

With srcset and lazy loading working properly, the phone gets small files and only the images actually scrolled to. Same page, a fraction of the data.

How lazy loading works

Images get the attribute loading="lazy". The browser then waits to download them until they are close to appearing on screen. It is built into modern browsers, so no JavaScript plugin is needed.

ImageLazy-load?
Hero or banner at the topNo. Load it immediately with high priority
Logo in the headerNo
Images further down the articleYes
Product grid below the first rowYes
Footer images and badgesYes

How srcset works

When you upload an image, WordPress creates several copies at different widths (such as thumbnail, medium, large and some extra sizes). In the page, it lists them in a srcset attribute with a sizes hint, and the browser picks the smallest file that still looks sharp on that screen.

<img src="photo-1024.jpg"
  srcset="photo-300.jpg 300w, photo-768.jpg 768w, photo-1024.jpg 1024w, photo-1536.jpg 1536w"
  sizes="(max-width: 768px) 100vw, 768px"
  width="1024" height="683" loading="lazy" alt="...">

Getting it right in WordPress

  1. Upload a sensible originalAbout 1920 to 2560 pixels wide for large images, already compressed. WordPress makes smaller sizes from it.
  2. Insert images normallyUse the image block or your page builder’s image widget rather than pasting HTML, so WordPress can add srcset.
  3. Check the heroView the page source or run PageSpeed Insights. The first large image should not have loading=”lazy” and ideally has fetchpriority=”high”.
  4. Watch your pluginsIf a speed plugin also lazy-loads images, make sure it excludes the first images and does not double up.
  5. Keep width and heightThese attributes reserve space so the layout does not jump while images load.
Images set as CSS backgrounds (common in sliders and some page builder sections) do not get srcset or native lazy loading. Use them sparingly for large photos, or use your builder’s options for responsive background images.

Common problems

  • Blurry images: the uploaded original was too small, so WordPress has no large version to offer.
  • Slow LCP: the hero image is lazy-loaded. See images and LCP.
  • Layout shift: missing width and height attributes.
  • Huge uploads folder: very large originals multiplied by many generated sizes. Compress before uploading.

Read our WordPress image optimisation guide and ideal image sizes for websites. Need help with a slow WordPress site? Get a quick quote.

Sources

Frequently asked questions

Does WordPress lazy-load images automatically?

Yes. Since WordPress 5.5, images get native lazy loading by default, and newer versions avoid lazy-loading the first large image.

Should I lazy-load my hero image?

No. The first visible image should load immediately, ideally with high fetch priority, or your LCP score suffers.

What is srcset?

An HTML attribute that lists several sizes of the same image so the browser can download the smallest one that looks sharp on the current screen.

Why are my WordPress images blurry?

Usually the uploaded original was too small. Upload a large enough image (around 1920 to 2560 pixels for big images) and let WordPress create smaller sizes.

Do background images support lazy loading?

Not natively. CSS background images do not get srcset or loading=”lazy”, so use them carefully for large photos.

Free toolTry the Free Image Compressor

Shrink photos for websites, email and forms in seconds, privately in your browser.

Open the free tool →
Written by Tanvir H

WordPress and Elementor web designer at Tanvir WebXprt, Bangladesh, with 7+ years of experience and 650+ projects. Tanvir builds the free tools on this site and writes practical guides for creators, learners and small businesses.

Learn more

Guides for this tool

Built by Tanvir WebXprt

Want a tool, website or app like this for your business?

Every free tool on this site is designed and coded by Tanvir H, a Bangladesh-based WordPress and Elementor web designer with 7+ years of experience and 650+ projects for clients worldwide. Fast, mobile-first, search-optimised websites that turn visitors into customers.

Website developmentWordPress, Elementor & e-commerce sitesfrom $899
Creative designWeb, graphic & brand identityfrom $220
SEO & paid adsRank on Google, run Meta & Google Adsfrom $300
Speed & fixesCore Web Vitals, bugs and upgradesCustom quote
  • 650+ projects
  • 7+ years
  • 4.9★ rating
  • Govt. registered freelancer

Contents

Was this helpful? Spread the word and share with your network!
Facebook
Pinterest
LinkedIn
Reddit
VK
X
Telegram
Threads
Tumblr
Email
WhatsApp
Pocket

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Article

How to crop a photo without losing quality guide cover with a zoom icon
How to Crop a Photo Without Losing Quality

Crop photos without losing quality: why cropping reduces resolution, how many pixels you need for each use, a 6-step method and why repeated saving hurts.