PixFlow · Compression

Compress an image, properly

Making a file smaller is easy. Making it smaller without anyone noticing takes knowing what each format can survive, and what size to aim for. Everything runs inside your browser — no image is ever uploaded.

What size to aim for

The right question is not "as small as possible" but "small enough for where it's going". Squeezing a photo down to 40 KB when it is destined for an A4 print is as costly a mistake as emailing a 12 MB file.

UseTarget sizeWhat actually matters
Email attachment200 KB – 1 MBGmail caps at 25 MB and Outlook at 20 MB, but many corporate mail servers cut off well below that.
In-article image60 – 150 KBEvery image weighs on LCP, which Google wants under 2.5 seconds.
Large hero image150 – 300 KBThis is almost always the element that decides the page's LCP.
Social media300 KB – 1 MBThe platform re-compresses anyway. Getting the dimensions right matters more.
Printdon't compressKeep the original resolution. Compression artefacts show up on paper.

The quality slider, in practice

On a JPG or a WebP, quality is not a percentage of fidelity — it is an encoder setting. Going from 100 down to 80 mostly discards detail the eye cannot resolve, which is why the file shrinks dramatically while looking unchanged.

QualityVisible effectWhen to use it
90 – 100NoneArchiving, further editing, printing.
80Invisible in normal useThe default, and the right call most of the time.
60Visible when zoomed inThumbnails, galleries, images displayed small.
40 and belowClear artefacts on flat areasAvoid, unless the size constraint is extreme.

A JPG that has already been compressed loses quality again on every further pass, even at a high setting. Always start from the original, never from a file that has already been optimised.

Lossy or lossless: pick the right format first

This is the most common mistake, and the one that wastes the most bytes. PNG preserves every pixel exactly: perfect for a logo, crisp text or transparency, disastrous for a photograph. A photo saved as PNG routinely weighs five to ten times its JPG equivalent, for a result the eye cannot tell apart.

If your PNG is a photograph, don't try to compress it — convert it to JPG or WebP instead. The difference is not close. Keep PNG only when transparency or absolutely sharp text is genuinely required.

WebP does both — lossy or lossless, with transparency — and typically lands 25 to 35 percent below a JPG of comparable quality. Every current browser reads it.

Why this runs in your browser, not on a server

Most online compressors upload your files, process them on their own infrastructure, then hand you a download link. Your images travel through a machine you don't control, and often sit there for hours afterwards.

PixFlow does the whole job in your browser, using the Canvas API and WebAssembly. In practice: nothing to upload, so no wait proportional to your connection speed; no volume limit imposed by a server; and sensitive documents — ID papers, scanned contracts, private photos — that never leave your machine. Once the page has loaded, the tool works offline.

Frequently asked questions

Does compressing an image permanently reduce its quality?

For JPG and WebP, yes. Lossy compression discards information and the original cannot be rebuilt from the compressed file, so always work on a copy and keep the original. For PNG, compression is lossless: the file is re-encoded more efficiently and not a single pixel changes.

What quality setting should I use for a JPG?

Quality 80 is the sweet spot for most photographs: the difference is invisible to the naked eye, yet the file is often three to four times lighter than the same image at maximum quality. Drop to 60 for thumbnails or images displayed small. Below 50, artefacts start showing on flat areas and gradients.

Are my images uploaded to a server?

No. PixFlow compresses your files directly in your browser using the Canvas API and WebAssembly. No image ever leaves your device and nothing is stored. Once the page has loaded, the tool keeps working even with the connection switched off.

Why does my PNG barely get smaller?

PNG is a lossless format, so the only gain comes from a more efficient re-encoding — typically 5 to 25 percent. If your PNG is a photograph, the real win is a format change: converting to JPG or WebP usually divides the file size by five or more. Keep PNG only when you need transparency or perfectly crisp text.

Go further