How to prepare images for a website (a checklist that actually gets used)
Most site speed problems are image problems. A short, repeatable process fixes the majority of them before an image ever gets uploaded.
Published Updated 7 min read
Unoptimised images are the single most common cause of slow-loading web pages, and the fix rarely needs a build pipeline — it needs the same handful of steps applied every time an image goes on the site. This is that checklist.
1. Resize to the actual display size
Find the widest the image will ever render at on the page — check the design or the CSS, don't guess — and resize to that width (plus roughly 1.5–2x if you explicitly serve high-density displays). A hero banner rarely needs to be wider than 1920px; a blog body image rarely needs more than 1200px; a card thumbnail is often 400–600px.
2. Choose format by content, not habit
| Content | Format |
|---|---|
| Photographs, hero images, product photos | WEBP (JPG fallback if you must support very old browsers) |
| Logos, icons, illustrations with flat colour | PNG or SVG if it's vector |
| Screenshots with text or UI | PNG, or lossless WEBP if your pipeline supports it |
| Anything transparent and photographic (cut-outs) | WEBP |
3. Compress with a visible target
Quality 75–85 for JPG or WEBP covers almost every web use case without visible loss at normal viewing distance. Push it as low as it will go while still looking right at full size — not in a shrunk browser preview, where artefacts hide.
Things that get forgotten
- Alt text — write a real description of the image, not the filename. It matters for accessibility and for search.
- Consistent aspect ratios within a grid or gallery — mismatched ratios cause layout shift as images load.
- Filenames — descriptive, hyphenated filenames help far more than people expect and cost nothing to fix before upload.
- Retina assets — only serve 2x images if you're actually requesting them conditionally; otherwise you're doubling weight for no benefit on standard screens.
The five-minute version
- Crop out anything the image doesn't need.
- Resize to the real display width.
- Convert to WEBP (keep a JPG fallback only if you need it).
- Compress at quality 80, check the result at full size.
- Write real alt text before you upload.
Tools for this
Keep reading
- How to reduce image file size without wrecking the pictureMost oversized images are oversized for one boring reason: the dimensions are far larger than anywhere they're displayed. Fix that first, then compress.
- How to choose the right image format, every timeJPG, PNG, WEBP, GIF, SVG, TIFF — each one was built for a specific job. Pick by content type and you'll rarely get it wrong.
- Image dimensions vs file size: why a bigger picture isn't always a bigger filePixels, quality and format each move file size independently. Understanding how they interact stops you fixing the wrong one.