How to Compress PNG Images Without Losing Quality

PNG files are heavy for a simple reason: most carry millions of colors where hundreds would do, plus metadata, color profiles, and lazy compression settings from the exporting app. The fix is quantization — reducing the palette with transparency fully intact — which typically shrinks PNGs 50–70% with no visible change. Here is where PNG weight comes from, the exact method for graphics and logos, and when to stop compressing and convert instead.

The short answer

Drop the PNG into a quantizing compressor and set around 128 colors: visually identical for most graphics, with full alpha transparency preserved. Use 64 colors for flat logos and icons, stay at 192–256 for long gradients, and watch the saved-percentage readout as you adjust.

If the image is a photograph, skip PNG compression entirely — photos quantize badly and band visibly. Convert photographic PNGs to JPG or WEBP instead, which run circles around even the best-compressed PNG.

Where PNG weight really comes from

Three culprits, in order of impact. First, truecolor bloat: a logo saved as PNG-24 carries 16.7 million colors when 128 would be invisible to any eye — that alone often doubles or triples the file. Second, metadata and color profiles designers never meant to ship: text chunks, EXIF, and ICC profiles ride along from Figma, Sketch, and Illustrator exports. Third, weak DEFLATE settings: most apps save PNGs with fast, lazy compression that a dedicated optimizer beats by 10–30% without touching a single pixel.

Knowing which culprit dominates your file decides the method: quantization for palette waste, metadata stripping for exports, re-compression for everything else.

The quantization method that preserves transparency

  • Start at 128 colors and compare side by side with the original at full zoom — most graphics are indistinguishable.
  • Drop to 64 colors for flat-color logos and icons; the savings jump while edges stay crisp.
  • Stay at 192–256 colors for images with long gradients, where aggressive palettes band visibly.
  • Keep full transparency throughout: palette PNGs carry per-color alpha, so soft anti-aliased edges survive quantization intact.
  • Forget the old myth that PNG-8 means on-off transparency — that limitation came from GIF-era exporters, not the PNG format itself.

Truly lossless savings first

When pixels must not change — archiving originals or images that will be edited again — stay byte-perfect and still save weight. Strip metadata and text chunks, which is lossless for pixels and also drops hidden EXIF. Re-compress the DEFLATE stream with a harder-working optimizer for single-digit to 20% savings. And save non-interlaced: progressive Adam7 rendering typically adds file size for no benefit on the modern web.

One caveat: removing an embedded ICC color profile can subtly shift rendering on wide-gamut screens even though pixel data is identical — test brand-critical colors after stripping.

When to convert instead of compressing

Quantization has a hard limit: photographic PNGs with millions of subtly different colors band visibly at 256 colors no matter the tool. A photographic PNG is typically four to six times larger than the equivalent JPG with no visible difference — convert it and pocket the difference.

The rule of thumb: transparency, text, or sharp edges that must stay lossless go PNG and get quantized; everything photographic goes JPG at quality 90 or WEBP. Compress only at the final export step — editors expand PNGs back to uncompressed RGBA on load anyway.

Convert PNG to JPG or WEBP free — up to 50 images

Frequently asked questions

Will compressing a PNG break its transparency?

No, when done right. Quantization preserves the full alpha channel including soft edges, and lossless methods never touch pixels at all. Verify on both light and dark backgrounds before publishing.

Should I use PNG-8 or PNG-24?

PNG-8 (256 colors or fewer) for logos, icons, and flat graphics — dramatically smaller. PNG-24 for complex gradients, soft transparency blends, and anything you will edit again.

How much smaller can a PNG get?

Typically 50–70% via quantization with no visible change, plus 10–30% more from metadata stripping and DEFLATE re-compression. Screenshots and exports from design tools compress best.

Should product photos be PNG?

Almost never. Photographic PNGs run four to six times larger than equivalent JPGs. Use PNG for graphics needing transparency or lossless quality, and convert photos to JPG or WEBP.

Does removing metadata shrink PNGs?

Yes, modestly — text chunks, EXIF, and profiles add real bytes, and stripping them is also good privacy hygiene. It is lossless for pixels, so do it on every export.

About BulkImageSEO

BulkImageSEO is a free image SEO toolkit maintained by Salah Berrehou. It renames files with keyword-rich names, injects Title, Subject, Tags and Comments metadata, compresses images for Core Web Vitals and converts formats. Uploaded files are deleted after 60 minutes and no account is required. Read more about the author, the step-by-step guide, or contact us.