Skip to content
All posts
CompressionUpdated 7 min read

How to Compress Images Without Losing Quality

Compression is not just dragging a quality slider down. What actually shrinks file size, with measured numbers — and what turns your photos to mush.

By Builds and maintains Appzo Tools, including every image tool on this site.

The short version

A four-step routine that shrinks image file size while keeping the result visually indistinguishable from the original.

  1. 1

    Resize to the dimensions you actually display

    Find the width the image is rendered at and resize to it, or to twice that for high-density screens. This does more for file size than any quality setting, because it removes pixels rather than detail.

  2. 2

    Choose a lossy format

    WEBP for anything on the web, JPG if the file has to open in older software. Keeping a photograph as PNG is the most common cause of an unnecessarily large image.

  3. 3

    Set quality to 80–85

    This range is visually indistinguishable from the original for most images while delivering the bulk of the available saving. Drop to 75 for thumbnails and background images; below 60 text and hard edges visibly blur.

  4. 4

    Compare before and after, then export

    Look at the result at full size, paying attention to text edges, skin tones, and flat gradients — the three places artifacts appear first. If it holds up, export. If not, raise the quality a notch rather than changing format.

"Compress" gets treated like one lever, but there are really two: how many pixels the image has, and how much detail you throw away per pixel. Most bloated images have a pixel-count problem, not a quality-setting problem.

That distinction matters because the two are not equally costly. Reducing pixel count is close to free — if an image is displayed at 800px, the pixels beyond that were never visible in the first place. Reducing quality actually discards detail you might have wanted. Do the free one first.

Resize before you compress

A photo straight off a phone is often 4000 × 3000 pixels or larger — several times bigger than it will ever display on a web page. Compressing that at high quality still leaves you with a multi-megabyte file, because you are preserving detail nobody will see at the display size. Resize to the dimensions the image actually needs first, then compress.

Here is what that looks like measured. Same screenshot, same encoder, same quality setting of 85 — the only variable is the width.

Measured file sizes for the same screenshot at three widths, each encoded at quality 85
WidthPNGJPG q85WEBP q85
1600px245.4 KB161.5 KB44.8 KB
1200px271.8 KB99.5 KB26.0 KB
800px137.2 KB50.2 KB14.2 KB

Encoded 18 August 2026 with sips 316 and cwebp 1.6.0. Halving the width from 1600px to 800px cut the WEBP from 44.8 KB to 14.2 KB — a 68% saving, with no change to the quality setting at all.

Note the oddity in the PNG column: resizing to 1200px produced a larger file than the 1600px original. That is not a typo. Downscaling blends neighbouring pixels into new intermediate colours, and PNG's compression relies on long runs of identical colour. It is a good argument for not shipping resized PNGs at all.

Quality settings: 80–85 is the sweet spot

For JPG and WEBP, quality below 60 starts showing visible blocky artifacts, especially around text and hard edges. Above 90 you are paying real file size for detail that is genuinely hard to see on a screen. Most photos hold up fine at 80–85.

A heading and body text encoded at JPG quality 12, zoomed in to show blocky halos and mosquito noise around every letter.
Quality 12, zoomed to 3×. The halos around each letter are mosquito noise — JPG's block-based compression failing on hard edges. This crop was 6.3 KB against 26.5 KB at quality 92.
  • 90 and above: reserve for images people will zoom into, or print-ready assets
  • 80–85: the standard for hero images, product photos, and anything prominent
  • 70–75: aggressive but usually fine for thumbnails and background images
  • Below 60: visible artifacting on text and edges — only for images displayed very small

One caveat about quality numbers: they are not comparable across formats. JPG quality 85 and WEBP quality 85 are different encoders making different decisions, and in the table above they produced 161.5 KB and 44.8 KB from the same source. Do not assume matching the number matches the result.

Switching format often beats compressing harder

If an image is already a reasonably compressed JPG, pushing the quality slider lower gets ugly fast. Converting it to WEBP at the same visual quality usually saves more than another 10 points of JPG quality would, and without the artifacts. Google's corpus study puts WEBP 25–34% below equivalent JPG; on flat-colour images like screenshots the gap is far wider.

Format is the first thing to check when an image feels heavy, not the last.

Do not recompress an already-compressed JPG repeatedly

Every JPG save is lossy. Open a JPG, edit it, save as JPG again, and you are compounding artifacts on top of artifacts — generation loss. If an image is going to be edited more than once, keep a PNG or a source file as your working copy and export to JPG only as the final step.

Worth being precise about this, because it gets overstated: re-saving a JPG at the same quality with the same encoder is nearly idempotent, since the data is already quantised on the same grid. The damage comes from editing between saves, or from changing quality or dimensions. That is the common case, which is why the advice holds.

Strip metadata you do not need

Photos from phones and cameras carry EXIF data — camera model, GPS coordinates, timestamps — that adds a few kilobytes. The kilobytes barely matter. The GPS coordinates do: they pin the location the photo was taken, which for anything shot at home is worth removing before you publish.

Any tool that re-encodes through a canvas, including every image tool on this site, drops metadata as a side effect. If you need to inspect or selectively edit tags rather than discard them all, that is a different job.

Where the artifacts show up first

When you are checking whether a compressed image still holds up, three places give it away before anything else does.

  • Text and hard edges — halos and fuzz around letters, the first thing to fail
  • Flat gradients like a clear sky — banding, where a smooth transition becomes visible steps
  • Skin tones — blotchy patches, because the eye is unusually sensitive to them
Rule of thumb: resize to the size you will actually display, convert to WEBP, set quality to 85, and only go lower if the file still feels heavy.

Frequently asked questions

Resize it to the dimensions you actually display first — that removes pixels nobody sees rather than detail you might want. Then encode as WEBP at quality 80–85, which is visually indistinguishable from the original for most images. In our test, resizing a screenshot from 1600px to 800px cut the file by 68% with no change to the quality setting.

Not directly — encoders take a quality setting, not a target size. The practical approach is to resize to your display dimensions, encode at quality 85, and check the result. If it is still over budget, drop quality in steps of 5 rather than jumping straight to a low number. Switching from JPG to WEBP usually gets you there faster than lowering quality does.

85 for anything prominent, 75 for thumbnails and background images. Below 60, artifacts around text and hard edges become visible. Above 90, you pay noticeably more file size for detail that is very hard to see on a screen. Quality numbers are not comparable across formats — JPG 85 and WEBP 85 are different encoders making different decisions.

It can. Each lossy save re-encodes, and if you edit or resize between saves the artifacts compound — this is generation loss. Re-saving an untouched JPG at identical settings is close to harmless, since the data is already quantised on the same grid. Keep a lossless master and export a compressed copy each time rather than editing the compressed one.

Indirectly but meaningfully. Images are usually the heaviest thing on a page and the most common cause of a slow Largest Contentful Paint, which is a Core Web Vital that Google uses in ranking. Compression does not help you rank by itself — it helps by removing the delay that was hurting you.

Sources and further reading

The claims on this page about formats, browser behaviour, and performance come from these primary sources rather than from us.