Toolzy

Srcset Generator

Build a responsive img tag with srcset and sizes.

Output

Enter a base image URL and target widths to generate a responsive <img> tag with srcset and sizes attributes.

How to use

  1. Enter the base image URL.
  2. List the widths you want, separated by commas.
  3. Copy the generated responsive img tag.

Frequently asked questions

How are the srcset URLs named?
Each width appends a -<width>w suffix before the file extension, e.g. photo-640w.jpg.
What is the sizes attribute for?
It tells the browser how much space the image occupies so it can pick the right source.

Related tools