Why a fixed quality number is not enough
Many tools ask you for a JPG quality such as 80 and apply it to everything. But quality 80 means very different things for different pictures. A portrait against a plain wall at 80 may look flawless while a photo of a tree at 80 shows smudges in the leaves. To be safe, people pick a high number and waste space.
This tool measures instead. It compresses representative parts of each photo at several qualities, compares each with the original, and keeps the lowest quality that still scores as high as the level you chose. Smooth photos go lower and detailed ones stay higher, so the file is as small as that picture allows. It also keeps full colour resolution for pictures with sharp coloured edges, such as red text, where the usual halving of colour detail would show. And it never goes below a floor quality (74 at Balanced): smooth skies and gradients show blocks and bands at low quality even when a similarity score does not notice, so those pictures are held at a safe quality.
What recompressing a JPG costs
A JPG is lossy, so compressing it again adds a little more loss on top of what it already has. That is why the tool is careful with a picture that has been through it before. It works out the quality the file was saved at. If the quality is already at or below what the level would use, or the new copy would be less than 5 percent smaller, the file comes back unchanged and a note says so. A JPG that this tool made itself is recognised exactly, from its quantization tables, and is never saved again at the same level or a gentler one. Compress the original once, and use that result.
A photo from a camera or phone, saved at a high quality, is compressed as usual. A photo that was shared through a chat app or saved at a low quality is usually returned as it is, since there is little left to take out.
Where the savings come from
- A lower quality where the eye does not notice. This is most of the saving.
- Less colour detail. JPG stores colour at half the resolution of brightness, which is invisible in photos.
- Tighter packing. Optimised tables and progressive scans, which most cameras do not use.
- No hidden data. Embedded previews, camera details and sometimes a colour profile are dropped. These are often several kilobytes.
- One channel for a grey photo. A black and white photo is saved with a single brightness channel instead of three, which is 1 to 4 percent smaller than a grey picture stored in colour.
If you need more, set the longest side to something sensible for where the photo will be used. A photo shown 800 pixels wide does not need 4,000.
Orientation, colours and metadata
Phones often store a photo sideways and add a note that says how to turn it. The compressed copy is turned the right way up and the note is dropped, so it looks the same everywhere. Colours are converted to the standard sRGB, so a photo from a wide gamut camera looks as it did in the browser. A photo that comes back unchanged keeps its own colour profile and rotation note, with the camera details and location cut out of the file when you asked for that.