Responsive images
Responsive images let the browser choose the right size and format of an image for each screen, using the srcset and sizes attributes or the picture element.
A phone with a 400-pixel-wide screen doesn't need the 2,500-pixel image made for a large monitor. With `srcset` you list several widths of the same image; with `sizes` you tell the browser how wide it will be shown. The browser then downloads the smallest one that looks sharp.
It is usually the single biggest page weight saving on image-heavy sites.
In Framer
Framer generates several image sizes automatically and serves them with srcset.
How Regular approaches it
Every CMS image in Standard gets a srcset automatically. An image proxy resizes uploads to fixed widths from 480 to 2,560 pixels with Cloudflare Images, picks AVIF or WebP when the browser supports them and caches each result. Editors upload one image; visitors get the right one.
Sources and further reading
- Responsive images, MDN Web Docsdeveloper.mozilla.org