Social Image Compressor — smaller files, and what they cost
A photo straight off a phone is often eight or twelve megabytes, and most of that weight buys nothing once the picture is a square in somebody’s feed. This image compressor re-encodes it in your browser so the file you upload is smaller, and it is blunt about the trade: it shows the real byte counts, the signed percentage change, a zoomable side-by-side of the original and the result, and a measured curve of file size against quality for your specific picture. Nothing is uploaded — the file is decoded, redrawn and re-encoded entirely on your own device, and the page makes no network request while it works.
Re-encoding is not repacking
The mechanism here is canvas.toBlob(). Your browser decodes the file into raw pixels, those pixels are drawn onto a canvas, and a fresh encoder compresses them again from nothing. That matters more than it sounds. Even at quality 1.00 a JPEG or WebP output is a brand-new lossy encode, not a tidier copy of the original bits, so this is not a lossless optimiser in the sense that tools like mozjpeg or oxipng are. It also explains the result people find most surprising.
Why there is no recommended quality
Plenty of guides name a number. None of them can, because how a setting holds up is a property of the setting and the image together. A portrait against a soft out-of-focus background survives compression that visibly destroys a screenshot full of small text, a flat sky with a hard horizon through it, or a logo with clean vector edges. So instead of a number, this tool measures the actual size-versus-quality curve for the picture you loaded, at real encoded byte counts, and marks where that curve crosses your original file’s size. On most photographs the curve is steep at the very top and almost flat through the middle — which is to say the last few points of quality cost a great deal and buy very little, and where exactly that turns is different for every image.
Formats, and the one that ignores the slider
JPEG is the right default for photographs and cannot store transparency at all. WebP is usually smaller than JPEG at a comparable appearance and keeps an alpha channel. PNG is lossless, which is why the quality slider disappears when you select it: the canvas encoder takes no quality argument for PNG, and asking for 0.2 returns byte-for-byte the same file as asking for 1. With PNG selected, any size change comes from re-encoding and from a resize, never from quality tuning.
If your image has transparent pixels and you choose JPEG, those pixels have to become some opaque colour. The tool stops and asks which colour rather than guessing, because a browser left to itself will commonly pick black — which is how a transparent logo ends up in a black box.
Resizing is usually the bigger lever
Halving an image’s width and height quarters its pixel count, and file size follows roughly along. A 4032-pixel-wide photo displayed at 1080 pixels is carrying detail nobody will ever see. The resize control here always preserves the aspect ratio and never enlarges — it is a lever on file size, not a crop, so there is no offset, no framing handle and no aspect-ratio preset.
Look at the pixels, not only the number
Compression artifacts are invisible at fit-to-width and obvious at 200 percent, which is why the comparison viewer has a draggable divider, a zoom control and a button that jumps both panes to the busiest region of the picture. That is where ringing on hard edges, blocking in smooth gradients and smeared fine text show up first. A percentage tells you what you saved; only the zoomed view tells you what it cost.