Doviren
中文 ▾

怎么压缩图片又不把质量压坏

手机随手拍一张可能就 5MB,十张放一页,访客多半没等加载完就走了。好消息是,这些体积里很大一部分本来就是多余的。

图为什么会这么大有损与无损选对格式按步骤来哪些工具做得好常见错误

图为什么会这么大

原条目从分辨率、色彩数据和格式开销讲起:文件大不等于信息多。

有损与无损

无损是重新组织数据,有损是丢掉一部分人眼不敏感的信息。选哪种,取决于这张图要不要当母版。

选对格式

照片、图标、透明图适合的格式并不一样,原条目按用途给了对照,比一味压 JPEG 更省体积。

按步骤来

先定显示尺寸,再选格式,最后调压;每一步都在肉眼能接受的范围内停手。

哪些工具做得好

原条目列了本站导航目录里的几款压缩工具,可对照它们的免费档限制挑一个。

常见错误

反复压同一张图、把压缩版当唯一原图、忘了改显示尺寸却只压体积——这三种最常白忙。

常见问题

压完能看出差别吗?

在合理范围内通常不明显,但放大看一定会有损失。

原图要留吗?

要,压缩是不可逆的。

只改尺寸不行吗?

很多时候改显示尺寸比硬压体积更有效,原条目把这一步放在最前面。

关于原文与更新

本页中文部分按中文习惯重写,只转述原条目已有的事实,不新增功能承诺。下面是原站评测全文,一字未删照搬,便于逐条核对;第三方服务的功能与免费额度会变,以英文原条目和对方官网为准。

打开英文完整条目 →

原站评测全文(英文原文,照搬)

How to Compress Images Without Losing Quality: A Practical Guide

A single unedited photo from a modern phone can be 5MB. Put ten of those on a page and you have built something most visitors will abandon before it finishes loading. The good news is that most of that weight is unnecessary, and removing it costs almost nothing in visible quality.

Why Images Are So Large

An image file stores a value for every pixel. A 12-megapixel photo contains twelve million of them, and before compression each one needs three colour channels. That is roughly 36MB of raw data before any encoding happens.

Compression is what brings that down to something manageable, and it works in two fundamentally different ways — which is where most of the confusion comes from.

Lossy Vs Lossless

TypeWhat it doesTypical savingUse for
LosslessRewrites data more efficiently; every pixel is recoverable exactly5-20%Logos, screenshots with text, source files
LossyDiscards detail the eye is unlikely to notice50-80%Photographs, web images

The word "lossy" sounds alarming, but applied sensibly the discarded information is genuinely imperceptible. A well-compressed JPEG at quality 80 is very hard to distinguish from the original at normal viewing size, while being a fraction of the size.

Lossless matters where precision is required. A screenshot containing text compressed with JPEG produces muddy, fringing characters; PNG keeps them crisp. That is why the rule of thumb exists at all.

Choosing The Right Format

FormatBest forTransparencyNotes
JPEGPhotographsNoSmallest for photos; no alpha channel
PNGScreenshots, logos, textYesLossless; much larger than JPEG for photos
WebPAlmost everything on the webYesTypically 25-35% smaller than PNG or JPEG at equal quality
SVGIcons, simple graphicsYesVector — scales infinitely, tiny file
GIFSimple animationYesLimited to 256 colours; poor for photos

If you are publishing to the web and not constrained by legacy support, WebP is usually the right answer. It supports both lossy and lossless modes plus transparency, and it is supported by every current browser.

Step By Step

  1. Resize first. This is the biggest win and the one most people skip. If your page displays an image at 800px wide, there is no reason to serve a 4000px file. Resizing before compressing typically accounts for most of the saving.
  2. Pick the format. Photographs to JPEG or WebP; anything with text, flat colour or transparency to PNG or lossless WebP.
  3. Compress with a quality slider. Start around 80 and reduce until you see degradation, then step back up one notch.
  4. Inspect at 100% zoom. Check faces, skies and gradients — these show banding and artefacts first.
  5. Compare the numbers. Note the saving percentage so you can repeat the same settings next time.

Compress with TinyPNG → Or use PicCalc locally

Tools That Do It Well

TinyPNG / TinyJPG

The default choice for most developers. It reduces the colour palette rather than blurring pixels, typically saving 50–70% with no visible difference on screenshots and flat graphics. Free with a batch limit, and it preserves PNG transparency — which naive JPEG conversion destroys.

PicCalc

Worth choosing when images are confidential, because compression happens locally in your browser and nothing is uploaded. It also shows the size before and after, so you can see exactly what you saved.

Convertio or CloudConvert

Better when you also need a format change — for example converting a batch of PNGs to WebP, which is often a larger saving than compressing within the same format.

tip

Common Mistakes

  • Compressing without resizing. The most common error, and the one that leaves the most size on the table.
  • Using JPEG for screenshots. Text and UI edges acquire visible artefacts; use PNG or lossless WebP.
  • Compressing an already-compressed file repeatedly. Each generation degrades quality further with diminishing size returns. Always work from the original.
  • Ignoring transparency. Converting PNG to JPEG silently drops the alpha channel and usually fills it with white.
  • Embedding large images as Base64. This inflates size by about 33% and prevents separate caching.
  • Never checking the result. Automated settings occasionally ruin an image; a glance at 100% zoom catches it.

Frequently Asked Questions

How much can I compress without visible quality loss?

Typically 50-70% for photographs using lossy compression, and noticeably more if you also resize to the dimensions you actually display.

Is lossy compression bad?

Not at sensible settings. It discards detail the eye generally cannot perceive. It is only a problem if you compress repeatedly or push quality very low.

Should I use WebP instead of JPEG or PNG?

For web publishing, usually yes. WebP is typically 25-35% smaller at equivalent quality and supports transparency, with support in all current browsers.

Why does my screenshot look bad after compressing?

You probably used JPEG. Screenshots with text and flat UI need PNG or lossless WebP to stay crisp.

Does resizing really matter that much?

Yes — it is usually the single largest saving. Serving an image at the size it is displayed beats any compression setting.

Can I compress images without uploading them?

Yes. PicCalc performs compression locally in your browser, so the file never leaves your device.