Tested tool guide
Tested browser tools
Checked August 16, 2026
What Responsive Image Srcset Generator does, with a checked example
A generator that turns your image variants into the srcset and sizes attributes of an img tag. You enter each file with its real pixel width and describe how wide the image renders at each breakpoint; the tool returns attribute markup you can paste straight into HTML or a template. The one thing most people get wrong: srcset without a matching sizes. When sizes is missing, browsers assume the image fills the full viewport width, so a small card image on a big monitor downloads the largest file you published. Sizes is what makes the width descriptors meaningful.
Worked example
A concrete input and expected output from the current implementation.
Input
Image variants: hero-400.jpg, hero-800.jpg, hero-1600.jpg. Layout: full viewport width on screens up to 900px wide, half the viewport width on larger screens.
->
Expected output
<img src="hero-800.jpg"
srcset="hero-400.jpg 400w, hero-800.jpg 800w, hero-1600.jpg 1600w"
sizes="(max-width: 900px) 100vw, 50vw"
alt="Hero image"> On a 375px phone at device pixel ratio 1, the first sizes rule applies, the slot is 100vw, about 375px, and the browser picks the smallest candidate at or above that width: hero-400.jpg. On a 1440px monitor the default rule applies, the slot is 50vw, about 720px, and it picks hero-800.jpg. The src value is the fallback for browsers without srcset support.