How to resize an image without losing quality

更新于 约 6 分钟

本指南仅提供英文版本。

“Resize without losing quality” is a slightly unfair promise, so it is worth being precise about what is true: making an image smaller can be nearly lossless if it is done properly, and making it larger cannot be. Most of the quality people lose during a resize actually comes from something else that happened in the same step.

Downscaling: the part that can go well

When you reduce a 4000 px image to 1000 px, four source pixels have to become one. How the tool decides that single value is the whole ballgame.

The naive approach — nearest neighbour — picks one of the four and discards the rest. On a photograph you get aliasing: jagged diagonal lines, moiré patterns on fabric and brick, and a general shimmer along edges. It is fast and it looks bad.

Better resamplers average the contributing pixels, weighted by distance. Browsers do this by default when they draw an image at a smaller size, which is why a well-implemented in-browser resize is not a compromise.

The remaining subtlety is large reductions in a single step. Going from 4000 px straight to 400 px means each output pixel is derived from a hundred input pixels, and most resamplers only sample a small neighbourhood, so information gets skipped rather than averaged — edges come out crunchy. The fix is to do it in stages, halving repeatedly (4000 → 2000 → 1000 → 500 → 400), so each step only ever averages a small, well-covered neighbourhood. That is what this site does internally for any large reduction, and it is why a batch of shrunk photos does not have that gritty over-sharpened look.

Upscaling: why it cannot work

Enlarging asks for detail that was never recorded. A resampler can make the transition between existing pixels smooth, which reads as blurry, or keep it abrupt, which reads as blocky. Neither adds information.

This is why enlarging past the original size is switched off by default here. AI upscalers are a genuinely different technology — they hallucinate plausible detail from a trained model, which is useful for some purposes and disqualifying for others (evidence, documents, anything where the invented detail matters). What they are not is a resize.

If you need a larger image, the answer is a larger source: re-export from the original file, the RAW, the vector, or the design document.

The thing that actually cost you quality

Nine times out of ten, when someone says a resize ruined their image, the resize was fine and one of these was the culprit:

Re-encoding a JPEG. Every JPEG save is a new lossy compression pass. Open, resize, save, open again, crop, save again — you have compressed twice, and the artefacts of the first pass got treated as real detail by the second. This is generation loss, and it is cumulative and irreversible. Do all your edits in one pass from the original and export once.

A quality setting left too low. A 1080 px image at JPEG quality 60 looks worse than the same image at 2160 px and quality 85, and people blame the dimensions. Check the quality slider before you blame the resampler.

Sharpening after the fact. Downscaling softens an image very slightly, and the instinct is to add sharpening. A little is fine; the usual amount is too much, and it produces bright halos along edges that survive every subsequent compression and look worse than the softness did.

The platform’s own re-compression. Upload a 6 MB file to a social platform and it will re-encode it aggressively with settings you do not control. Handing over a clean, correctly sized 400 KB file often produces a better end result than handing over the maximum-quality original.

A workflow that holds up

  1. Start from the original. Not the copy you emailed yourself, not the version saved from a chat app.
  2. Crop first, resize second. Cropping changes the composition and throws away pixels; do it while you still have all of them.
  3. Resize once, to the size you actually need. Not “roughly big enough, I’ll adjust later” — later means a second encode.
  4. Pick the format for the content. Photographs lossy, screenshots lossless.
  5. Set quality by watching the estimated size, and stop at the first value that meets your constraint.
  6. Export once, and keep the original.

For a batch, this is the same list with “apply to all selected files” left on — the point being that every file gets exactly one decode and one encode, rather than accumulating passes.

DPI, PPI, and why they keep confusing everyone

A digital image has one real dimension: pixels. DPI is a number stored in the metadata saying how densely those pixels should be printed. It has no effect on how the image appears on a screen, and social platforms and browsers ignore it entirely.

Changing DPI without changing the pixels changes nothing about the image. Where DPI becomes real is print, and the arithmetic is simple:

pixels = inches × DPI

  • A 4 × 6 inch photo print at 300 DPI needs 1200 × 1800 pixels.
  • An A4 page (8.27 × 11.69 in) at 300 DPI needs about 2480 × 3508 pixels.
  • A poster viewed from two metres away is perfectly fine at 150 DPI.

So when a print shop asks for “300 DPI”, what they need is a pixel count. Work it out from the physical size, resize to that, and ignore the metadata field.

When resizing genuinely is lossless

Two cases worth knowing. Lossless formats — PNG, lossless WebP — lose nothing to encoding, so a downscale in PNG is limited only by the resampler; the pixels you keep are stored exactly. And cropping without resizing in a lossless format removes pixels but changes nothing about the ones that remain. If you are working through several editing steps and want to stay clean, staying in PNG or lossless WebP until the final export means you only pay the lossy cost once, at the end.

更多指南

关于 EditImg.online

一个免费的浏览器图片工具,无需上传即可缩放、裁剪与转换。由一位开发者独立开发与维护,欢迎反馈和报告问题。

🔒 图片仅在你的设备上处理。Cookie 与广告相关说明请见隐私政策。

隐私政策 · 使用条款