r/webdev • u/IsotopeTrace • 3d ago
Showoff Saturday A browser-only image compressor that hits a target file size (no upload)
I got tired of image compressors that make you upload your file and then miss the size limit anyway, so I built one that runs entirely in the browser tab. Nothing is uploaded.
You pick an image, type the size you need in KB (say 100), and it works out the quality that fits. If the limit can't be reached even at low quality, it shrinks the image and tells you the new dimensions. JPEG and PNG go in, JPEG comes out, and transparent PNGs get a white background.
On my phone, a 3 MB photo came back under 100 KB in a few seconds. Big photos with a target size are the slow case, so that's where I'd most like to hear how it behaves on your devices.
https://tools.stellartechlabs.xyz/
If you try it and something breaks or feels slow, I'd like to hear about it. No sign-up.
2
u/bozehaan 3d ago
How do you know beforehand what size it's going to be when compressing? Or does it converge to the size slowly?
1
u/avetenebrae 2d ago
Why aim for consistent size instead of consistent quality?
1
u/fiskfisk 3d ago
And why not one of the zillion other services that do exactly the same?