srcset & sizes Playground

Write srcset & sizes, drag the viewport → your own browser picks the file. See the slot, the densities, your screen's DPR, and which file downloads at three…

Why it matters

Images are usually a page’s heaviest part. A dishonest sizes quietly downloads a file 4× bigger than what shows, and no error tells you. Without width and height, the text below jumps as the photo arrives. Seeing slot → density → DPR turns srcset from a copy-paste spell into a choice you understand.

The key idea

The browser picks the file before its CSS is done

Common mistakes

Try it in this playground