Responsive image srcset generator

Build srcset and sizes markup for a set of image widths.

FreeRuns in your browserNo signupUpdated 2026-10-29

Candidates

5

480 to 1920px

Largest file served

1920w

browsers never pick larger than they need

<img> markup
<img
  src="/images/hero-1920.jpg"
  srcset="/images/hero-480.jpg 480w,
          /images/hero-768.jpg 768w,
          /images/hero-1024.jpg 1024w,
          /images/hero-1440.jpg 1440w,
          /images/hero-1920.jpg 1920w"
  sizes="(max-width: 768px) 100vw, 768px"
  alt="Team working on a website design"
  width="1920"
  height="1080"
  loading="lazy"
  decoding="async"
/>
DeviceViewportSlot widthBrowser picks
Phone390px @3x390 CSS px1440w
Large phone430px @3x430 CSS px1440w
Tablet820px @2x768 CSS px1920w
Laptop1440px @2x768 CSS px1920w
Desktop1920px @1x768 CSS px768w

The simulation handles plain (max-width) and (min-width) rules with px or vw values. calc() and container queries are not simulated.

About this tool

How it works and how to read the result.

Need this done for you?

Technical SEO & performance

Faster pages, clean structure and better visibility in search.

See the service

What it does

A srcset generator writes the responsive image markup that lets each visitor download the smallest file that still looks sharp on their screen. Enter a URL pattern with a {w} placeholder, the widths you have exported and a sizes rule that describes your layout. You get an img tag, or a picture element with a WebP source, with width, height, alt and loading attributes filled in. A table then simulates five common devices and shows which file each one would choose.

How to use it

  1. Export the image at several widths, using file names that differ only by the width.
  2. Enter the URL pattern with {w} where the width goes, and list the widths.
  3. Write the sizes rule: how wide the image is shown at each breakpoint. The default means full width up to 768px, then a fixed 768px.
  4. Enter the master dimensions so the markup carries width and height, which prevents layout shift.
  5. Untick lazy load for the hero image, then copy the markup.

How to read the result

Candidates is the number of widths in the srcset, and Largest file served is the biggest one available. The table is the useful part: it shows the display width each device works out from your sizes rule, and the file it then picks.

With the defaults (widths 480 to 1920, and sizes of 100vw up to 768px, then 768px), a 390px phone at 3x density shows the image 390 CSS pixels wide. It needs 390 × 3 = 1,170 real pixels, so it picks the 1440w file. A 1920px desktop at 1x shows the image at 768 CSS pixels and picks the 768w file, not the 1920w one. That difference is the saving srcset exists for.

If a device picks the largest file and still needs more, add a bigger width. If several devices pick the same file, you can probably drop a width. Browsers may choose a smaller candidate on a slow connection, so treat the table as the typical case rather than a guarantee.

Make the files with the image resizer. Responsive images and the faster LCP they bring are a standard part of our technical SEO work.

Questions

Frequently asked.

What is the difference between srcset and sizes?

srcset lists the files you have and how wide each one is. sizes tells the browser how wide the image will be displayed at each screen width, before the CSS has loaded. The browser combines the two with the screen's pixel density and picks the smallest file that will still look sharp.

Which widths should I generate?

Four to six widths cover most layouts. A common set is 480, 768, 1024, 1440 and 1920 pixels. Make the largest at least twice the widest display size, so high-density screens get a sharp file. More widths save a few kilobytes per visitor but add files to manage.

Should the hero image be lazy loaded?

No. The hero is usually the Largest Contentful Paint element, and lazy loading delays it. Untick lazy load for any image visible without scrolling; the generator then adds fetchpriority="high" instead, which tells the browser to fetch it early. Lazy load everything further down the page.

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

We reply within a working day. No spam, ever.