All articles
Image Tools• 8 min read•

How to compress images without visibly losing quality

Performance audits keep arriving at the same verdict: images dominate page weight, and most ship heavier than necessary. The encouraging part is that visible quality rarely needs to drop. Compression failures trace back to three habits — choosing the wrong format, pushing sliders recklessly, and feeding enormous camera originals straight to the web. Reorder the operations correctly and a multi-megabyte photograph becomes a couple hundred kilobytes that look identical at normal viewing sizes. Nothing below requires expensive software or deep image-science knowledge; it requires only understanding which decision affects which outcome, applied in the right order.

Lossy versus lossless, honestly

Compression splits into two families, and honesty about both prevents poor choices. Lossless methods reconstruct the original image pixel-for-pixel; nothing is discarded, and size savings are correspondingly modest — typically tens of percent at best. Lossy methods throw away detail that human perception discounts anyway, trading unrecoverable subtlety for dramatic reductions of 70 to 95 percent. Neither family wins universally. Screenshots and diagrams need lossless fidelity because text edges smear visibly under lossy artefacts; photographs tolerate lossy treatment beautifully because sensor grain conveniently masks whatever gets discarded. Matching the family to the content is half of compression competence. The other half is choosing parameters within the family — which is where quality sliders enter the story.

The quality slider's sweet spots

For photographic JPEGs, quality settings between roughly 70 and 85 occupy the practical sweet spot: file size falls steeply while artefacts remain imperceptible at normal viewing distances. Below about 50, blocky seams crawl along edges, skies band into visible stripes, and textures develop a smeared plastic sheen — and crucially, no later operation repairs the damage, because compression loss compounds with every re-save. Above 90, file sizes balloon for improvements effectively nobody perceives. The disciplined routine is therefore: compress once, inspect the result at its actual display size, adjust once, stop. Chasing perfection at quality 96 produces files virtually indistinguishable from quality 80 — distinguishable chiefly by their download times.

WebP's quiet advantage

At matched visual quality, WebP typically lands 25 to 35 percent smaller than comparable JPEG thanks to smarter prediction between image blocks. Treat that figure as an approximation drawn from common benchmarks rather than a guarantee — results vary with subject matter — but the direction never changes. Browser support is now broad enough that WebP serves as a sensible default for web photography, with fallback conversion trivial when a legacy target demands it. The savings compound quietly across a site: an 800-kilobyte hero becomes roughly 550 kilobytes, and every visitor on every page view collects the difference in load time and data charges. For image-heavy pages, switching the format alone often recovers more performance than minifying every script on them combined.

Resize first, compress second

The biggest wins come from shipping fewer pixels, not from squeezing existing ones harder. Phone cameras routinely produce images around 4000 pixels wide — twelve million pixels apiece — while a typical content column displays perhaps 1600 pixels. Downscaling to display width first removes roughly 84 percent of the pixel count before compression even begins, after which the compressor works on an already-modest canvas. Resizing a five-megabyte original to web width alone frequently lands beneath 500 kilobytes before any quality tuning starts. The order matters because compression cannot undo resolution: fit dimensions to destination first, tune quality second, and skip the megapixel tax that readers on metered connections pay on your behalf. A resize tool that previews output dimensions removes the guesswork from the very first step.

PNG is for flat colour, not photographs

PNG excels at hard-edged, flat-colour content — screenshots, logos, charts, interface captures — where its lossless nature preserves text crispness and uniform regions compress superbly. Photographs invert the calculus entirely: PNG's lossless storage of continuous gradients produces files several times larger than equivalent JPEG or WebP with zero visible benefit in return. Camera-roll images saved as PNG remain the single most common bloat pattern found in page-weight audits. The working rule fits on one line: content containing text, geometry or large flat areas belongs in PNG; content containing skin, sky, foliage or fur belongs in JPEG or WebP. Container choice follows content type rather than habit:

You are shippingReach forWhy
Photographs for the webJPEG or WebPLossy discard invisibles; sizes collapse
Screenshots containing textPNGLossless keeps glyph edges crisp
Logos and interface iconsPNG or SVGFlat colour compresses superbly; edges stay sharp
Photos needing maximum squeezeWebPRoughly a quarter smaller at like visual quality
Quick format selection guide

Compression never changes dimensions

Compression-only workflows alter bytes, never width and height. A compressed image loads faster yet occupies identical layout space — a recurring surprise for teams who expected the on-screen footprint to shrink along with the file. Changing proportions is resizing, a separate operation which, as covered earlier, should happen first anyway. Keeping the two operations distinct in your head prevents the classic complaint that compression failed to shrink an image on screen, when it faithfully shrank only the file behind it. It also clarifies tooling: a compressor asks how aggressively to discard detail, while a resizer asks how many pixels to keep, and conflating the two questions leads to images that are simultaneously too heavy and too small.

Your photos never leave your browser

One quiet advantage of doing this work in the browser deserves emphasis: personal photographs never leave the machine. Upload-based services copy images onto servers governed by opaque retention policies; browser-side tools process everything locally through canvas and transmit nothing across the wire. For identity documents, family pictures or anything remotely sensitive, that difference settles the tooling decision by itself. Compression is a mathematical transformation of bytes you already possess — there is no technical reason it should ever involve a round trip to somebody else's computer. The same reasoning applies to conversion and resizing: all three are pure pixel arithmetic that modern browsers handle comfortably offline, on a train with no signal included.

A five-step compression routine

Run every image through the same short sequence:

  • Resize to actual display dimensions before doing anything else.
  • Pick the format by content type, not by force of habit.
  • Compress photographs at quality 70 to 85.
  • Inspect the result at real viewing size, not zoomed to 400 percent.
  • Stop adjusting after one correction; repeated lossy saves compound damage.

Try the tools from this article

Free, no sign-up, and everything runs inside your browser — nothing is uploaded.