Forma says<picture> and srcset serve the right image per screen — smaller files on phones, crisp ones on retina.
A plain <img> sends everyone the same file. srcset offers several sizes and lets the browser pick by screen width and pixel density, paired with sizes to say how wide the image renders.
<picture> goes further: <source> children with media queries swap entirely different crops (art direction) or modern formats (AVIF/WebP) with a JPG fallback in the inner <img> — which is still required.
Power-ups you unlock
srcset + sizes = browser picks the best-fit file
<picture> + <source media> = art direction & format swaps
Always keep a plain <img> inside <picture> as fallback
Serves smaller bytes to phones, sharp images to retina
Captain Invalid Input attacks — common mistakes
Omitting the inner <img> inside <picture> (nothing shows)
srcset without sizes → browser guesses the render width
Serving a 4000px image scaled down with CSS on mobile
Boss battleBuild a <picture> that uses a WebP source with a JPG fallback, then add a srcset with two widths to the inner img.