Rasp

How to

How to reduce image file size

Most people reach for the quality slider first. It is the third thing that should be tried, and usually the least effective.

How do I reduce an image's file size?

Resize first — an image displayed at 600 pixels does not need to be 4000 wide. Then change format: on our test image, converting a PNG to WebP cut it by 94%. Only then reach for the quality slider. Doing it in that order gets the largest saving for the least visible damage.

How to do it

  1. Resize to the size it is actually displayed at. Match the largest size the image is shown at, doubled for high-density screens. An image in a 600-pixel column wants to be 1200 pixels wide. This is usually the single biggest saving available.
  2. Change the format. Convert to WebP or AVIF. Both compress far harder than JPG or PNG at the same visual quality, and both keep transparency.
  3. Lower the quality, watching the readout. Only now. Move the slider down and read the resulting size after each change, rather than guessing at a setting.
  4. Check the result at full size. Compression artefacts are invisible in a thumbnail and obvious at 100%. Look at flat areas like skies and at any hard edges before committing.

Do these in order

The order matters more than any individual technique, because each step shrinks the work the next one has to do.

Most people go straight to the quality slider, which is the smallest lever with the most visible damage.

1. Resize — usually the biggest win

File size scales roughly with pixel count. Halve both dimensions and you remove about three quarters of the data, before any compression decision has been made.

A photograph straight from a phone is commonly 4000 pixels wide. Displayed in a 600-pixel column on a web page, more than 90% of those pixels are being downloaded and then thrown away by the browser.

The rule: match the largest size the image is actually displayed at, then double it for high-density screens. A 600-pixel column wants a 1200-pixel image.

Resize the image first. Everything after this is working on a much smaller starting point.

For print, ignore this step — printing genuinely needs the pixels.

2. Change the format

This is the second-largest lever, and it costs nothing visually.

Measured on this site’s fixed test image, from the same source:

Format Size
PNG 3.97 MB
JPG 375 KB
WebP 247 KB
AVIF 109 KB

Converting a photographic PNG to WebP took 94% off it. That is not a saving any quality slider will reach without visible damage.

  • Going on a website you control → WebP or AVIF
  • Being sent to a person → JPG, because you cannot predict their software
  • A screenshot with text → keep PNG and optimise it losslessly

3. Now lower the quality

Only after the first two steps, because they have already done the heavy lifting.

Compress the JPG and watch the size readout after each change. Two things that page’s measurements make clear:

  • Re-encoding at the quality a file already uses gains nothing. Our test file was saved at quality 82; re-encoding at 82 produced the same size.
  • Raising quality above the source’s own level makes the file bigger without improving it. At 95, the same file grew 54% — spending bits faithfully recording artefacts that were already there.

So you have to go below whatever the source used, and you usually cannot tell what that was. Which is why the readout matters more than the number on the slider.

4. Check it at full size

Compression damage is invisible in a thumbnail and obvious at 100%.

Look at two things specifically: flat areas such as skies or plain walls, where banding and blotching appear first, and hard edges, where haloing shows. If either looks wrong, go back one step rather than accepting it — the damage is permanent.

Common situations

Email attachment too large → resize to 2000 pixels wide, convert to JPG at quality 82. That handles almost every case.

Web page loading slowly → resize to twice the displayed width, convert to WebP or AVIF, serve both with a fallback.

Upload form rejecting the file → resize first, then lower quality while watching the readout until it fits.

Screenshot too bigoptimise the PNG losslessly. Keeps the text perfectly crisp. Convert to WebP only if slight softening is acceptable.

iPhone photos too largeconvert HEIC to JPG, resizing at the same time if they are headed for a screen.

What not to do

Do not convert to PNG to “keep the quality”. For a photograph this makes the file roughly ten times larger and improves nothing — PNG faithfully preserves the detail loss that is already there.

Do not compress repeatedly. Each lossy save discards more. Go back to the best original you have and do it once.

Do not resize upward. Enlarging invents pixels by interpolation; it cannot recover detail that was never captured.

Questions

How do I get an image under a specific size, like 2 MB?
Resize it first, convert to a modern format, then lower quality while watching the size readout after each change. There is no formula from quality setting to file size — it depends entirely on the image — so reading the number is the only reliable method.
Can I reduce file size without losing any quality?
Only with lossless optimisation, which rewrites a PNG's compression without altering a pixel. It typically saves 10-30%. Everything else — resizing, changing format, lowering quality — trades some fidelity for a much larger saving.
Which saves more, resizing or compressing?
Resizing, usually by a wide margin, and it is the one people skip. File size scales roughly with pixel count, so halving both dimensions removes about three quarters of the data before any compression decision is made.
What is the best format for a small file?
AVIF, then WebP. On our fixed test image the same source was 375 KB as JPG, 247 KB as WebP and 109 KB as AVIF. AVIF is much slower to encode, which matters only if you are converting in bulk.
Why is my screenshot so large?
Probably because it is a PNG at full retina resolution, which is correct for text but heavy. Optimise it losslessly to keep the text crisp, or convert to WebP if slight softening of the letters is acceptable.
Does emailing a photo compress it automatically?
Some clients offer to. Do not rely on it — the behaviour varies by client and by platform, and you have no control over the result. Compress deliberately before attaching.
Will reducing file size hurt print quality?
Resizing will, because printing needs far more pixels per inch than a screen. Keep print images large and at a high quality setting; the advice on this page is aimed at screens.

Sources

Related reading