Image guide
How to Prepare Images for a Website
Preparing an image for a site is three decisions made in the right order: the layout picks the pixel width, the format picks the encoder, and quality only trims what is left.
The numbers below were measured with this site's resizer and converter on one 4,000 x 2,667 photo (963 KB). Your own image will differ; the ratios are the part that carries over.
Recommended tool
Open Resize ImageStart from the width the layout renders
A hero is usually displayed 1,400-2,000 CSS pixels wide, a content image 700-900, a card thumbnail 300-400. Resize to that width, and double it once if the page must stay sharp on high-density screens.
The same photo, exported here at the default JPEG quality: 2,400 px wide gives 842 KB, 1,600 px gives 424 KB, 1,200 px gives 274 KB, 800 px gives 126 KB, 400 px gives 35 KB.
That is most of the work. An 800 px slot that receives the 963 KB original downloads about 7.7 times the bytes it can actually show.
Choose the format from what the image contains
The same 1,600 px export, four outputs from this site's converter: JPEG at 92% is 424 KB, WebP at 92% is 348 KB (18% smaller), WebP at 80% is 176 KB (59% smaller than the JPEG), and PNG is 3.1 MB (7.4 times the JPEG).
Photographs belong in JPEG or WebP. Screenshots, logos, diagrams, anything with small text or transparency belongs in PNG, or in WebP when you need both alpha and a smaller file.
WebP is smaller here in both cases, but switch only if the destination accepts it: CMS upload fields, email templates and some older visitors still expect JPEG or PNG.
Treat quality as the last adjustment
Quality cannot fix the wrong width. On the same 1,600 px WebP, 92% gives 348 KB and 80% gives 176 KB. At 80%, open the export at 100% zoom and check small text, faces and sharp edges; if they smear, go back up and accept the extra bytes.
When a form or platform sets a hard limit, use the exact-KB compressor, which searches quality for you. Still open the downloaded file before uploading it - a passing byte count is not proof the image still looks right.
Never upscale, and keep one full-size copy
Resizing up adds bytes and blur. If the source is smaller than the slot, get a larger original or make the slot smaller instead.
Keep the untouched original outside the published folder, or in a folder the build ignores. Re-exporting from an already compressed file loses detail every time, and a later redesign will need the original again.
The order that avoids rework
Crop for composition, resize to the rendered width, pick the format, adjust quality, then inspect the export at 100% before uploading.
All of the tools on this page read the file in your browser; the image itself is not uploaded to an application server.