How to use it
- Drop the images. Each one is decoded once to show its pixel size and file size.
- Choose Quality (one encode at the chosen setting) or Target file size (iterates until the file fits), optionally limit the resolution and pick JPEG/WebP output.
- Press Compress. The headline shows the total saving; the table lists every file with its new size and a download link.
- Download single files or the ZIP. Adjust the settings and run again if a file is still too large.
Example
A 4,032 × 3,024 px JPEG of 3.4 MB compressed at quality 75 becomes about 620 KB (−82 %). With “Target file size 200 KB” and the resolution limited to 1,920 px, the tool first tries quality 90 at 1,920 × 1,440, then lowers quality in 5 % steps (and the resolution if needed) until the output is under 200 KB – usually 3–4 passes.
How the compression works
The tool uses the open-source browser-image-compressionlibrary on the main thread (its optional web worker would download the library again from a CDN, so it is disabled to keep everything local). The library reads the EXIF orientation, draws the image on a canvas – downscaled when a resolution limit is set – and encodes it with canvas.toBlob(type, quality). In target-size mode it loops: encode, compare with the limit, multiply quality (and, failing that, the dimensions) by 0.95, up to 12 iterations.
Because the pixels are re-encoded, the output has no EXIF, XMP or ICC data and is in sRGB. If the result is not smaller than the input and the format is unchanged, the original bytes are returned instead. Colours and transparency: JPEG output flattens transparent areas; WebP and PNG keep them. Limits: canvas memory (roughly 40 MP here, lower on iOS); HEIC input is refused.
Sources: browser-image-compression on GitHub, MDN – HTMLCanvasElement.toBlob() quality parameter, Google – WebP compression study (25–34 % smaller than JPEG).
Which quality should I use?
- 85–92: prints and portfolio images; indistinguishable from the original.
- 70–80: web pages, email, social media – the usual sweet spot.
- 50–65: thumbnails and previews; slight softness and blocking in flat areas.
Questions
- Why did my PNG get bigger or stay the same?
- PNG is lossless, so the quality setting cannot shrink it; the only lever is resolution. The tool keeps the original when the re-encoded PNG is not smaller. Switch the output to WebP or JPEG for photos, or keep PNG only for graphics with sharp edges and transparency.
- Does the GPS location stay in the compressed photo?
- No. Compression writes new pixels without EXIF, so the location, camera model and capture date are gone. Only files returned unchanged keep their metadata; use the EXIF Remover if you want a stripped copy without recompression artefacts.
- Can I reach exactly 100 KB?
- The target is an upper bound: the loop stops at the first pass that is under the limit, so the file may be noticeably smaller than the target. Very small limits for large images are reached by reducing the resolution.