b2KIT

Responsive Image Generator

Generate multiple sized versions of images for responsive srcset attributes.

Tested tool guide Tested browser tools Checked August 16, 2026

What Responsive Image Generator does, with a checked example

Feed it one image, choose the widths you want, and it returns a resized, re-encoded file for each width plus the srcset markup to serve them. Everything happens locally in your browser, so your original is never uploaded and large photos are fine to use. The surprise most people hit: the output is a menu, not a rule. The browser picks which candidate to download, and if you publish the srcset without a sizes attribute it assumes the image fills 100% of the viewport, so a small inline image can still pull a full-width file.

Worked example

A concrete input and expected output from the current implementation.

Input

photo.jpg at 2400 x 1600 px; requested widths: 400, 800, 1600 px

Expected output

Three files: photo-400.jpg, photo-800.jpg, photo-1600.jpg, plus this markup:

<img
  src="photo-1600.jpg"
  srcset="photo-400.jpg 400w, photo-800.jpg 800w, photo-1600.jpg 1600w"
  sizes="100vw"
>

Each w descriptor equals the pixel width of the matching file, which is what the browser keys on. Rendered full-width on a 375 CSS px phone with a 2x screen (needing roughly 750 px of source), the browser picks photo-800.jpg; on a 1x desktop showing the image at 1400 CSS px it takes photo-1600.jpg, since the 800 px copy would have to upscale.

How the result is produced

1

The generated files

The tool resamples the source image to each requested width while keeping the aspect ratio, then hands back one downloadable file per width. Each copy is a real resize with the pixels re-encoded at the new size, so file sizes track the dimensions. The original file is never modified. The widest entry is the natural fallback for the src attribute, so the image still renders on clients that ignore srcset.

2

The srcset contract

Each entry pairs a file with a w descriptor, the pixel width of that file. At load time the browser compares the candidate widths with the image's rendered width on the current viewport, applies the device pixel ratio, and downloads the best fit. The sizes attribute tells it how wide the image will actually render; with no sizes attribute the browser assumes 100vw, which makes even small layouts pull full-width files.

Good uses

  • Hero images: build a 320 to 1920 px ladder from one original so phones download a small file and desktops get the sharp version.
  • Content images in fixed columns: for an image that renders at half the viewport on desktop, generate 400/800/1200 px copies with sizes="(min-width: 900px) 50vw, 100vw" so no device fetches more pixels than it displays.
  • Catalog or template work: generate the same width ladder for many product photos so every image in a grid follows one consistent srcset pattern you can paste into the template.

Limits and checks

  • The browser decides which file to fetch. The generated srcset is a menu of candidates, not an assignment: the choice happens at load time from viewport width, device pixel ratio, and network conditions, so the same page can download different files on different visits. Forcing one specific file per breakpoint is what the picture element with media queries is for.
  • The w descriptor must match the real file. The 400w in the markup means "this file is 400 pixels wide"; browsers distrust candidates whose descriptor disagrees with the actual intrinsic width of the image and may skip them. Before deploying, spot-check that the emitted widths match the downloaded files' dimensions.
  • You cannot get more pixels than the source has. A requested width larger than the original produces a copy no wider than the source itself (or an upscaled one, depending on the tool), and re-encoding a lossy format loses a little quality on every pass. Check the largest copy against the original before relying on it.

Common questions

Does this upload my image to a server?

No. The resizing and encoding happen entirely in your browser; the original never leaves your machine and nothing is stored. That is also why the tool is safe to feed very large photos - the heavy work stays local and there is no upload size limit imposed by a server.

Why did the browser pick a different file than I expected?

srcset is a menu and the browser orders from it at load time, using the image's rendered width, the device's pixel ratio, and network conditions - a slow connection can legitimately receive a smaller file. If it consistently overshoots, check sizes first: when that attribute overstates the real rendered width, the browser fetches oversized candidates. The picture element is the only way to force exact files per breakpoint.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools