Re-encoding, not shrinking: what compression actually does
An image compressor re-encodes a picture with a codec setting that discards information the eye is least likely to notice, producing a smaller file at the same pixel dimensions.
Images are almost always the heaviest thing on a web page. A single unoptimised photograph straight from a phone can outweigh every script, stylesheet and font on the page combined — and it is usually the element that decides your Largest Contentful Paint score.
Compression is one of two levers, and it is the second one. This page explains what the quality setting does to each format, why resizing should normally come first, and how to judge when you have gone too far.
How this compressor works
Unlike most of the tools on this site, this one uses a server. Being clear about that matters more than sounding privacy-first.
- Processing location
- Your file is uploaded over HTTPS, processed in memory by a server-side image library, and returned. It is not written to disk or retained after the response — see the privacy policy for the full statement.
- Upload limit
- 10 MB per image. Larger files should be resized first, since a photo that big is almost certainly far larger than it needs to be.
- JPEG
- Re-encoded with an mozjpeg-style encoder at the quality you choose. This is lossy: information is permanently discarded, and re-compressing an already-compressed JPEG degrades it further.
- PNG
- PNG is normally a lossless format, but this compressor does not keep it lossless: at every slider setting the image is converted to a palette of at most 256 colours, with dithering, and lower numbers keep fewer colours. On logos, screenshots and other flat graphics that is usually invisible and the file shrinks a lot. On photographs it can show as banding or grain, and in our tests the slider made little difference to the size of a photographic PNG, because 256 colours is the ceiling at any setting.
- WebP
- Re-encoded at the quality you choose. Google’s web.dev guidance puts WebP files at usually 25–35% smaller than their JPEG and PNG counterparts.
- GIF
- The number of colours scales with the slider — quality as a percentage of 256 colours, never fewer than 8. A photograph saved as GIF is almost always better off as JPEG or WebP.
- Metadata
- Camera details, GPS location and other embedded metadata are not carried into the compressed file. JPEG photos are rotated upright first, so they do not turn sideways when the orientation tag is dropped.
- Reported saving
- The percentage shown compares the returned file size against the original upload, so it is a real measurement of that file rather than a marketing average. If re-encoding would not make the file smaller — an image that was already well optimised — your original is returned unchanged and the saving shows 0%.
Choosing a quality setting
Direct answer: for photographs on the web, quality 75–85 is the range where almost nobody can see the difference and the file is a fraction of the original. Below 60, artefacts become visible in skies, skin tones and gradients.
| Setting | Typical result on a photo | Use it for |
|---|---|---|
| 90–100 | Very large file, no visible gain over 85 | Archival masters and images that will be edited again |
| 80–90 | Excellent quality, moderate size | Hero images, product photography, portfolio work |
| 70–80 | The sweet spot for most web images | Blog images, thumbnails, listing photos |
| 50–70 | Visible softness and blocking in flat areas | Background images and anything shown small |
| Below 50 | Obvious artefacts | Rarely worth it — resizing saves more with less damage |
These bands describe photographs. Flat graphics, screenshots and text-heavy images behave differently: JPEG compression makes text edges fuzzy at any quality, so use PNG or WebP for them.
Mistakes that waste most of the available saving
Compressing before resizing
A 4000-pixel-wide photo displayed in an 800-pixel column is carrying twenty-five times the pixels it needs. Compression cannot recover that; only resizing can. Resize first, then compress — in that order the saving compounds.
Re-compressing an already-compressed JPEG
Every lossy round trip discards more detail permanently. Keep the original file, and compress from it each time rather than compressing the compressed version.
Using JPEG for screenshots and logos
JPEG was designed for continuous-tone photographs. Sharp edges, flat colour and text produce visible ringing. PNG or WebP handles these far better and often smaller.
Compressing a photograph that is saved as PNG
PNG is built for flat colour, not continuous tone, so a photograph saved as PNG is large. This compressor can cut it down by reducing it to 256 colours, but the result shows banding and the slider barely changes it. Converting the photo to JPEG or WebP with the image converter usually gives a smaller, better-looking file.
Judging quality on a phone screen
Compression artefacts are most visible on a large, colour-accurate display. Check the result at 100% zoom on the biggest screen you have before committing.
Forgetting transparency
Converting a transparent PNG to JPEG fills the transparent area with solid colour. If the image sits on a coloured background, that shows up as a white box.
The order of operations that gets the smallest file
Following these steps on a typical phone photograph usually takes it from several megabytes down to a few hundred kilobytes or less, with no visible loss at the size it is displayed.
- 1
Start from the original
Work from the highest-quality copy you have. Every intermediate save costs quality you cannot get back.
- 2
Crop to the composition you want
Cropping removes pixels outright. It is the cheapest byte saving available and it happens before anything else.
- 3
Resize to display dimensions
Match the width the image is shown at, doubled if you are serving a 2× asset for high-density screens.
- 4
Convert to the right format
WebP for photographs, PNG for graphics with flat colour or transparency. Convert before the final compression pass.
- 5
Compress and verify
Compress at 75–85, then open the result at full size from the link under the preview and compare it with your original. Re-run the website speed test afterwards to confirm the page-level improvement.
Sources and further reading
Where the technical statements on this page come from: standards, specifications and the official documentation of the tools and services involved.
- web.dev: Use WebP images — how WebP compares with JPEG and PNG on file size
- MDN: Image file type and format guide — which format suits which kind of image, and what lossy and lossless mean in practice
How this page is maintained
The 10 MB upload limit, the per-format encoder settings, the metadata handling and the “original returned if not smaller” rule were read from this tool’s server code. The PNG behaviour was measured by running that code on test images: at quality 95–100 as well as below it, the output is a palette image whose pixels differ from the original, which is why this page does not call PNG compression lossless. Quality bands are stated as practical guidance for photographic content, not as universal thresholds.
Written and reviewed by the ToolsRacks editorial team. Last reviewed: . Found an error? Tell us — see our editorial standards.