Why a phone photo is so large
A 12-megapixel camera writes roughly 12 million pixels and encodes them at a quality level chosen to survive editing, not to be emailed. But a full-screen photo on a 1080p display needs about 2 million pixels. You are carrying six times more detail than anything will ever draw, plus camera metadata, a thumbnail preview, and often a colour profile.
That is why the single biggest saving usually comes from resizing rather than from the quality slider. Halving the width and height quarters the pixel count, and file size falls roughly in step. If the image will be displayed at 1280 px wide, storing 4032 px is pure waste.
What "quality" really controls
Lossy codecs like JPEG and WebP work by throwing away detail the eye is bad at noticing. The image is split into small blocks, converted into frequency components, and the high-frequency components — fine texture and sharp transitions — are stored coarsely. The quality number decides how coarsely.
The relationship is not linear, and this is the part worth internalising:
- 95–100: visually lossless and very large. The last few points can double the file for no perceptible gain. Almost never the right choice for the web.
- 80–90: the safe range for photos you may crop or print later.
- 70–80: the sweet spot for the web. 75 is a sensible default; most viewers cannot pick it out from the original in a side-by-side.
- 50–70: visible softening in flat areas like skies, but often acceptable for thumbnails.
- Below 50: blocking and colour banding become obvious.
Going from 100 to 90 typically removes more than half the bytes. Going from 80 to 70 removes far less while costing more visible quality. That asymmetry is why "just set it to 75" is good advice.
Choosing a format
JPEG
Universally supported, good at photographs, no transparency. Still the safest choice when a file must open absolutely everywhere, including old software and printers.
WebP
Typically 25–35% smaller than JPEG at matched visual quality, supports transparency, and is supported by every current browser. For anything that lives on the web, this is usually the right answer. The exception is when a file must be opened by older desktop applications, some of which still do not read it.
PNG
Lossless, so the quality slider does nothing. Excellent for screenshots of text, diagrams, logos, and anything with sharp edges or flat colour. Terrible for photographs, where it can easily be five times the size of a JPEG. If you have a photo saved as PNG, converting it to JPEG or WebP is often the largest single saving available.
A note on GIF and AVIF
An animated GIF is best replaced by a video file, not recompressed — the format is limited to 256 colours and compresses poorly. AVIF compresses better than WebP but encodes slowly and is not yet available for output in every browser.
The one trap: re-encoding can make files bigger
Compressing an already-compressed image does not stack. If a file was saved at quality 60 and you re-encode it at 75, the encoder faithfully preserves the compression artefacts already present and spends extra bytes doing it. The result can be larger than the input and worse looking than the original.
Each lossy save is also permanent. Detail discarded at quality 75 cannot come back by re-saving at 95; you would simply store the degraded version more expensively. Keep an untouched original and always compress from that, never from a previously compressed copy.
This is why an honest tool must report the measured result. The image tool on this site compares the encoded bytes with the input and, if the output is larger, says so and hands back the original unchanged rather than shipping a "compressed" file that is worse in both dimensions.
Practical recipes
- Photo for a web page or blog post: resize to 1920 px wide, WebP, quality 75.
- Email attachment: resize to 1280 px, JPEG, quality 75. JPEG avoids "why can't I open this" replies.
- Upload with a strict size cap: reduce the dimensions first, then lower the quality. Cropping to what matters beats compressing the whole frame harder.
- Screenshot of text or a UI: keep PNG. Converting it to JPEG smears text edges and often is not even smaller.
- Logo or icon: use SVG if you have it. No raster compression can compete with a vector.
How this site does it
The image tool decodes your picture, optionally scales it, redraws it on a canvas, and re-encodes it in the browser. No request carries the image, so the offline test from our privacy checklist passes: disconnect from the network and it still works. Because JPEG has no alpha channel, transparency is composited onto white before encoding rather than turned black. Both the before and after figures shown are measured byte counts, not estimates.