Image Compressor图片压缩工具
Most "free" compressors quietly upload your photos to somebody else's server. This one cannot — it has no server to upload to. Drop your images in, watch the file sizes fall, and download.大部分「免费」压缩工具会悄悄把你的照片上传到别人的服务器。这个做不到 —— 因为它根本没有服务器。把图片丢进来,看着档案变小,然后下载。
Your images你的图片
Drop them in, then move the quality slider. Everything recompresses as you go.把图片丢进来,再拉动质量滑杆,全部会即时重新压缩。
How this is calculated计算方式说明
Every "free online image compressor" does the same thing: you upload your photo, a server somewhere re-encodes it, and you download the result. That works, but it means a stranger's machine has held a copy of your file. This tool skips that entirely. Your browser already contains a complete image decoder and a complete JPEG, PNG and WebP encoder — the Canvas API — so the whole job is done on your own computer. There is no upload, no queue and no size limit beyond your device's memory.
What actually happens when you press compress
Three steps, all local:
- Decode. The browser reads your file and turns it into raw pixels — a plain grid of red, green, blue and alpha values.
- Resize (optional). If you set a maximum width, those pixels are resampled down to the new dimensions.
- Re-encode. The pixel grid is written back out as a new JPEG, WebP or PNG at the quality you chose.
Because step 1 throws away everything that is not a pixel, the output also loses the file's metadata — EXIF camera settings, timestamps, and crucially the GPS coordinates that phones stamp into photos by default. That is a privacy win most people do not realise they are getting.
Why the file gets smaller
JPEG and WebP are lossy. They break the image into small blocks, convert each block into frequency components using a discrete cosine transform, and then throw away the high-frequency detail your eye is worst at noticing. The quality slider controls how aggressively that detail is discarded. They also store colour at half resolution — chroma subsampling — because human vision is far more sensitive to brightness than to colour.
PNG is lossless: every pixel comes back exactly as it went in. That is why the quality slider disappears when you choose PNG, and why re-saving a photograph as PNG usually makes it bigger, not smaller. PNG is for graphics with flat colour and hard edges, not for photographs.
Resizing beats quality, almost always
This is the single most useful thing to know. File size scales with the number of pixels, which scales with the square of the dimensions. Halving the width of an image removes about 75% of its pixels before any compression is applied at all. A 4,000-pixel-wide phone photo displayed in a 600-pixel-wide column on your website is carrying roughly forty times more data than it can possibly show.
Practical rule: set the maximum width first, and only then reach for the quality slider.
Which format to pick
| Format | Best for | Size & transparency |
|---|---|---|
| JPEG | Photographs, and anything you will email, upload to a government form or send on WhatsApp | Baseline size. No transparency. |
| WebP | Website images — smaller than JPEG at the same visual quality | 25–35% smaller. Keeps transparency. |
| PNG | Logos, screenshots, diagrams, anything needing a transparent background | Much larger for photos. Keeps transparency. |
WebP is supported by every browser in current use, including Safari since 2020. The one place to still prefer JPEG is when a file is going into somebody else's system — an online application form, a marketplace listing, a print shop — because those often accept JPG and PNG only.
What quality number should I use?
For photographs, 75 to 82 is the range where almost nobody can tell the difference from the original, and file size has already dropped by 60–80%. Below about 60 you start seeing "mosquito noise" — faint blocky ringing around text and hard edges. Above 90 you are spending a lot of bytes on detail nobody will see. Screenshots and images containing text are the exception: they hold up badly under JPEG compression, so use PNG or a quality of 90+ for those.
One thing to be careful about
Lossy compression is generational. Every time you re-encode an already-compressed JPEG you lose a little more, permanently, and it never comes back. Always compress from the original file, not from a copy you compressed last week. Keep your originals somewhere safe and treat the compressed versions as disposable output.
Sizes worth aiming for
- Website images — under 200 KB for a full-width banner, under 100 KB for anything smaller. Page weight is a direct Core Web Vitals input, and images are almost always the heaviest thing on a page.
- Email attachments — most corporate mail servers reject anything over 10 MB total, and many cap at 25 MB.
- Online application forms — Malaysian government and bank portals very commonly cap uploads at 200 KB, 300 KB, 1 MB or 2 MB per file, and often reject anything but JPG or PDF. Set a maximum width of 1,000–1,200 px and a quality around 70, then check the resulting size against their limit before you submit.
- Marketplace listings — Shopee, Lazada and Facebook Marketplace all re-compress your photos anyway, so send them a clean 1,200–1,600 px image rather than a 12 MB original that they will mangle.
市面上每一个「免费在线图片压缩」做的事情都一样:你上传照片,某处的服务器帮你重新编码,你再下载结果。这能用,但也代表你的档案曾经存在陌生人的机器上。这个工具完全跳过那一步。你的浏览器本身就内建了完整的图片解码器,以及 JPEG、PNG 与 WebP 编码器 —— 也就是 Canvas API —— 所以整件事都在你自己的电脑上完成。没有上传、不用排队,除了你设备的内存以外没有任何大小限制。
按下压缩时到底发生了什么
三个步骤,全部在本地:
- 解码。浏览器读取你的档案,把它变成原始像素 —— 一整片红、绿、蓝与透明度的数值。
- 缩放(可选)。如果你设了最大宽度,这些像素会被重新取样到新的尺寸。
- 重新编码。像素资料依你选的质量,重新写成新的 JPEG、WebP 或 PNG。
因为第一步会丢掉所有「不是像素」的东西,输出档也会一并失去原档的metadata —— 相机参数、拍摄时间,以及最重要的 GPS 坐标(手机预设就会写进照片里)。这是很多人没意识到自己顺便拿到的隐私好处。
档案为什么会变小
JPEG 与 WebP 是有损格式。它们把图片切成小方块,用离散余弦变换把每个方块转成频率成分,再把你眼睛最不敏感的高频细节丢掉。质量滑杆控制的就是「丢得多狠」。它们同时还会把颜色以一半的解析度储存 —— 这叫色度次取样 —— 因为人眼对亮度远比对颜色敏感。
PNG 则是无损的:每一个像素进去什么样,出来就是什么样。所以你选 PNG 时质量滑杆会消失;也因此把照片另存成 PNG 通常会变大而不是变小。PNG 是给色块平整、边缘锐利的图形用的,不是给照片用的。
缩尺寸几乎永远比降质量有效
这是最值得记住的一点。档案大小取决于像素数量,而像素数量与尺寸的平方成正比。把宽度砍一半,等于在压缩还没开始之前就先少掉约 75% 的像素。一张 4,000 像素宽的手机照片,放在网站上只占 600 像素宽的栏位,它带着的资料量大约是它能显示出来的四十倍。
实用原则:先设最大宽度,然后才去动质量滑杆。
该选哪个格式
| 格式 | 适合 | 大小与透明背景 |
|---|---|---|
| JPEG | 照片,以及任何要email、上传政府表格或用 WhatsApp 传的图 | 基准大小。不支持透明。 |
| WebP | 网站图片 —— 同样观感质量下比 JPEG 小 | 小 25–35%。保留透明。 |
| PNG | 标志、截图、图表,以及任何需要透明背景的图 | 照片会大很多。保留透明。 |
目前在用的浏览器全部支持 WebP,Safari 也从 2020 年起支持。唯一仍该优先用 JPEG 的场合,是档案要交给别人的系统 —— 在线申请表、电商平台、印刷店 —— 因为这些地方常常只收 JPG 和 PNG。
质量该设多少?
照片的话,75 到 82 是几乎没人分辨得出与原图差异、但档案已经小了 60–80% 的区间。低于大约 60 就会出现「蚊噪」—— 文字与硬边缘周围淡淡的方块状振铃。高于 90 则是把大量容量花在没人看得到的细节上。截图与含文字的图是例外:它们在 JPEG 压缩下表现很差,请改用 PNG 或把质量拉到 90 以上。
有一件事要特别小心
有损压缩是会「代代累积」的。每次你把一张已经压过的 JPEG 再压一次,就会再永久损失一点,而且救不回来。请永远从原档压缩,不要拿上星期压过的版本再压一次。原档要好好留着,压出来的版本当成随时可以重做的产物就好。
值得参考的目标大小
- 网站图片 —— 全宽 banner 控制在 200 KB 以内,其他更小的图控制在 100 KB 以内。页面重量直接影响 Core Web Vitals,而图片几乎永远是一个页面里最重的东西。
- Email 附件 —— 多数企业邮件服务器会拒收总容量超过 10 MB 的信,很多上限设在 25 MB。
- 在线申请表格 —— 马来西亚的政府与银行网站非常常见把每个档案限制在 200 KB、300 KB、1 MB 或 2 MB,而且往往只收 JPG 或 PDF。建议把最大宽度设在 1,000–1,200 px、质量约 70,提交前先对照它们的上限确认档案大小。
- 电商平台 —— Shopee、Lazada 与 Facebook Marketplace 反正都会再压一次你的图,所以直接给它们一张干净的 1,200–1,600 px 图片,好过丢一张 12 MB 的原档让它们糟蹋。
Frequently asked questions常见问题
Are my photos uploaded anywhere?我的照片会被上传到什么地方吗?
Why did my PNG get bigger instead of smaller?为什么我的 PNG 变大了而不是变小?
Should I lower the quality or reduce the width?我该降低质量,还是缩小宽度?
Does compressing remove the GPS location from my photos?压缩会移除照片里的 GPS 位置吗?
Some of my iPhone photos will not load. Why?我有些 iPhone 照片载入不了,为什么?
Need a website that brings you customers?想要一个能带来客户的网站?
We build the demo first. You only pay when you are happy with it.我们先做好 demo 给你看,满意了才付款。
Get a free demo免费获取 Demo