Example sizes values
| Layout | sizes |
|---|---|
| Full width | 100vw |
| Half width on desktop | (max-width: 768px) 100vw, 50vw |
| Fixed 600 px column | (max-width: 640px) 100vw, 600px |
Related tools
Frequently asked questions
What is srcset?
An img attribute listing several versions of an image with their widths, so the browser can download the most suitable one.
What does sizes do?
It tells the browser how wide the image will display at different screen widths, so it can pick from srcset before the page layout is known.
Which widths should I use?
Cover your layout from the smallest phone to large screens – for example 480, 768, 1024, 1440 and 1920 for a full-width image.
Why are some widths skipped?
Widths larger than the original image are skipped, because upscaling adds size without detail.
Which format is best?
WebP is supported everywhere and much smaller than JPG; AVIF is smaller still but slower to encode and only offered if your browser can create it.
Why include width and height?
They let the browser reserve space and prevent layout shift, which improves Core Web Vitals.
Should I lazy-load?
Yes for images below the fold; do not lazy-load the main image at the top of the page.
Do I need the picture element?
Only for art direction (different crops) or offering several formats with fallbacks. srcset alone handles resolution switching.
Is my image uploaded?
No – resizing and encoding happen in your browser.
What quality should I use?
75–85 is a good balance for photos.
Does it work for retina screens?
Yes – the browser accounts for device pixel ratio when choosing from srcset.
Can I use the HTML in WordPress?
Yes in a Custom HTML block, although WordPress also creates srcset automatically for media library images.
Is it free?
Yes – no sign-up, no limits and no watermark.
Is my code uploaded?
No. Everything runs in your browser; nothing you paste is sent to Docelora.
Can I use the output in commercial projects?
Yes. The output is yours to use however you like.
Does it work on a phone or tablet?
Yes – the layout adapts to small screens, though long code is easier to read on a larger display.
How do I copy the result?
Use the Copy button under the result, or Download to save it as a file.
Which browsers are supported?
Current versions of Chrome, Edge, Firefox and Safari.
Is there a size limit?
There is no fixed limit, but very large inputs can take a few seconds on older devices.
Can I suggest an improvement?
Yes – use the Contact page to tell us what would make the tool more useful.
Last reviewed: 16 November 2026.