$ img --compress --webp
Text and filesCompress Image Online
Shrink, resize and convert your images in batches — with no upload. The file is processed inside your browser and never reaches any server.
- the file never leaves your browser
- batch mode
- free, no sign-up
Why "no upload" changes everything
Practically every online compressor works the same way: you upload the image, a server processes it and sends the result back. That means the file left your machine and passed through third-party infrastructure with a retention policy you do not control. For a photo of a cat, fine. For a screenshot of a contract, a photo of an ID, a capture of a dashboard with client data or material for an unannounced launch, not so fine.
Here the image is read by the browser, drawn onto a canvas and re-encoded by your own computer's graphics engine. No network request takes place — you can disconnect from the internet after loading the page and keep compressing.
The three settings, in order of impact
- Maximum width — the biggest lever. Weight follows area, so halving the width removes about 75% of the pixels. A phone photo is 4,000 px wide; the largest common screen shows 1,920. Resizing before compressing usually solves it on its own.
- Format — WebP delivers the same visual result in a far smaller file than JPEG, and still carries transparency.
- Quality — the fine tuning. Between 75 and 85 the loss is invisible in practice; below 60 it starts to show.
Which format for which case
- WebP — the recommended default for the web. Smaller than JPEG at equivalent quality, supports transparency and is supported by every browser in use.
- JPEG — when the destination is an older system, a corporate email or a form that rejects WebP. No transparency.
- PNG — when no loss is acceptable: screenshots with text, icons, logos, charts with thin lines and any image that will still be edited.
Lossy compression has no way back
Lossy JPEG and WebP discard information on every save — and what was discarded does not come back. Re-compressing an already compressed file accumulates artefacts even at quality 100, because the second pass works on top of the first one's damage. Two practical consequences: always start from the original file, and keep that original. PNG is the exception, being lossless.
That is why the tool returns the original file when the result would come out larger and nothing structural changed: re-compressing an already optimised JPEG degrades the image and grows the file, the worst of both worlds.
Where this usually solves a problem
An application form that requires a photo under 2 MB. A marketplace listing with a per-image limit. A slow site because of camera-sized photos. An email attachment that will not go through. A résumé whose photo weighs more than the text. In all these cases the path is the same: reduce the width to what the screen actually uses and save as WebP or JPEG at 80.
If besides the weight you also need to measure the text of a caption or a post, the character counter has the limits for each social network. And to understand why 1 MB is not always 1 MB, the unit converter shows the difference between MB and MiB.
## faq
Frequently asked questions
Are the images uploaded to a server?
No. Unlike most online compressors, the file never leaves your machine here: the image is read, drawn onto a canvas element and re-encoded by the browser itself. There is no upload, no processing queue and no copy kept in the cloud — which matters when the images are documents, photos of an unreleased product, screenshots with client data or anything under NDA.
Which format produces the smallest file?
WebP, in most cases. For photography it typically produces files 25% to 35% smaller than a JPEG of equivalent visual quality; for images with flat areas and text the advantage over PNG is even larger, and it still keeps transparency. Browser support today is universal. Prefer JPEG only when the destination is an older system that rejects WebP, and PNG when no loss at all is acceptable.
What quality setting should I use?
Between 75 and 85 for photos on the web — the range where the visual difference is imperceptible and the file already drops a lot. Below 60, artefacts start showing in skies, skin and gradients. Above 90 the file grows quickly with no visible gain. If the image contains text or thin lines, use a higher value or switch to PNG: lossy compression smears sharp edges.
Does resizing shrink more than compressing?
Far more, and it is the most overlooked setting. File weight scales with area: halving the width removes about 75% of the pixels. A 4000 px phone photo resized to 1920 px loses most of its weight before any compression — and 1920 px is more than enough for any ordinary screen. Uploading the original at full size is the most common cause of a slow website.
Why does the file sometimes get bigger?
Because re-compressing an already optimised image adds information instead of removing it — the case of a JPEG that has already been through aggressive compression, or of converting a small PNG with few colours into a lossy format. When there is no resizing or format change and the result comes out larger than the original, the tool returns the original file: handing back a bigger file and calling it compression would be misleading.
Does quality degrade if I compress twice?
Yes, and there is no way back. Lossy JPEG and WebP discard information on every save: re-compressing an already compressed JPEG accumulates artefacts, even at quality 100. The rule of thumb is to always start from the original file — never from an already reduced version — and to keep that original somewhere. PNG is the exception: being lossless, it can be reprocessed as many times as you like without degrading.
Is PNG transparency preserved?
It depends on the output format. WebP and PNG keep the alpha channel normally. JPEG has no transparency: on conversion, transparent areas are filled with white — the tool warns about this on screen when JPEG is selected. If a logo or icon has to sit on a coloured background, choose WebP.
Is there a size or file-count limit?
No limit is imposed by the tool, because there is no server to overload — the ceiling is your browser memory. Images are processed one at a time precisely to avoid blowing up memory on large batches of phone photos. Very large files (above roughly 30 MP) may take a few seconds each on more modest machines.
## other tools