Compress JPG under 100 KB.
"Under 100 KB" is a real requirement — school portals, government forms, some job applications, WhatsApp attachment limits on flaky data. Fixed-quality compression is a guessing game. Target-size mode iterates until it hits the number.
The problem
Most compressors let you pick a JPG quality between 1 and 100 and hope for the best. But quality doesn't map linearly to file size — quality 60 on a 12 MP portrait might land at 340 KB, and on a screenshot might land at 84 KB. If you have a hard ceiling ("must be under 100 KB"), you can't set quality once and be done.
/squish/ ships a target-size mode: give it a number, it iterates. Behind the scenes, MozJPEG (WebAssembly) runs a bisection — try quality 70, measure, adjust up or down, repeat, until the output is at or just under your ceiling. Usually 3-5 encode passes.
Step-by-step
- Open /squish/ and drop the JPG onto the page. Multiple files work — target size will be applied to each independently.
- Switch mode to "Target file size." The Quality slider is replaced with a KB input.
- Type
100. Or200, or50, or whatever your requirement is. KB, not bytes. - Click Compress. Watch the progress ring; each pass shows the current attempt size. On a modern laptop it's under a second per image.
- Verify with the preview. If the preview looks over-degraded, either the target is too aggressive for the source (a 24 MP photo compressed to 20 KB will always look bad) or you'd benefit from resizing first — see the tip below.
- Download. ZIP for multi-file, individual for single.
What if it still can't hit the target?
Some sources cannot go below a certain size without becoming visually broken — a highly detailed photograph with a lot of high-frequency texture (grass, hair, foliage) resists compression more than a screenshot with flat regions. If /squish/ can't reach your ceiling, it'll stop at the closest achievable size and report the delta. Options:
- Reduce the pixel dimensions first (/resize/).
- Switch to WebP or AVIF — both compress 20-40% smaller than JPG at the same visual quality. Some upload portals accept WebP now.
- Crop to the essential region — /crop/ — before compressing.
Does file quality actually degrade?
Yes, but less than you'd expect for photos. MozJPEG's trellis quantization means quality 70 output from MozJPEG typically looks better than quality 80 output from a stock libjpeg encoder. That's why the target-size mode can reach smaller sizes than naive compressors while keeping the image usable.