How to compress images without losing visible quality

Measured file sizes at different quality settings, why resizing beats re-encoding, and which format suits which image.

Published: 26 November 2026Updated: 26 November 20263 min readGuides are written in English.

Compression throws information away, so the goal is not the smallest possible file — it is the smallest file that still looks right at the size it will be displayed. Two settings decide that, and one of them matters far more than the other.

The two dials: dimensions and quality

Dimensions are how many pixels the image has. Quality is how aggressively the encoder discards detail within those pixels. Reducing dimensions usually wins: a 2400-pixel-wide photo displayed in a 800-pixel-wide column is carrying three times the detail the screen can show.

Measured comparison

The figures below were measured in a browser using the same canvas encoder the image tools use. The sample is a synthetic 2400 × 1600 image with a smooth gradient, 900 translucent shapes and fine grain added on purpose. The grain makes it a deliberately hard case: photographic noise is the worst input for any lossy encoder, so your own photos will usually compress better than these numbers suggest.

OutputSizeShare of the PNG
PNG (lossless)6,212 KB100%
JPEG, quality 0.921,348 KB22%
JPEG, quality 0.75516 KB8%
JPEG, quality 0.60315 KB5%
WebP, quality 0.80709 KB11%
1600 × 1067, JPEG 0.75171 KB3%
1200 × 800, JPEG 0.7584 KB1%
800 × 533, JPEG 0.7556 KB1%

How to read that table

  • From 0.92 to 0.75 the file drops by about 62% (1,348 → 516 KB) with little visible difference at normal viewing size. This is the single most useful move for photographs.
  • From 0.75 to 0.60 saves a further 39%, and this is where smooth gradients start to band and edges pick up blocky artefacts. Acceptable for thumbnails, rarely for a portfolio image.
  • Resizing beats re-encoding. 1600 pixels wide at quality 0.75 is 171 KB — a third of the full-size file at the same quality.
  • WebP was larger than JPEG here at comparable settings. Quality scales are not comparable between codecs, and this synthetic image is unusually noisy. WebP tends to win on flat, graphic or text-heavy images, and it supports transparency, which JPEG does not.

Choose the format by content

ContentFormatReason
PhotographsJPEG or WebPLossy compression suits continuous tone
Screenshots, diagrams, textPNG or WebPLossless keeps text crisp; JPEG adds ringing around letters
Flat illustration, logosPNG, SVG for vectorsSharp edges and few colours
Images needing transparencyPNG or WebPJPEG cannot store an alpha channel

Workflow

  1. Resize to the largest size the image will actually be displayed at — Image Resizer.
  2. Compress with Image Compressor, starting at quality 0.8 and stepping down only if the file is still too large.
  3. Compare before and after at 100% zoom on a detail with texture, not on a flat area.
  4. For many files at once, drop the whole set in: results are listed per file, and each can be downloaded individually or together.

Common mistakes

  • Compressing a screenshot to JPEG, then wondering why the text is fuzzy. Use PNG or WebP.
  • Compressing the same JPEG repeatedly. Every pass re-encodes the artefacts of the last one; always start from the original.
  • Compressing before cropping, so detail is discarded from an area you were about to remove.
  • Upscaling a small image after compressing it. Interpolation adds pixels but not detail.
  • Judging quality at thumbnail size. Artefacts are visible at 100%, which is where a reviewer will look.

Related: resizing images for social media, removing an image background.

Tools used in this guide