It feels like a bug: you drop a PNG into a compressor and the "compressed" file is *bigger* than what you started with. It's not a bug — it's how lossless formats work, and it points you to the actual fix.

Why It Happens

PNG is already compressed. Every PNG is deflate-compressed internally; there is no "uncompressed PNG" to shrink. When a tool re-encodes one, three things can inflate the result:

  1. A well-optimized original. If the source was exported by a tool that already chose optimal filters and palettes, a generic re-encode with default settings produces a *less* efficient file.
  2. Palette loss. Many small PNGs are 8-bit (a 256-color palette). A pipeline that decodes them onto a full 32-bit RGBA canvas and re-saves produces true-color output — potentially several times larger with zero visible difference.
  3. The content was never PNG-shaped. Photographs stored as PNG are enormous by nature; lossless re-encoding can only shave percents off, and sometimes rounds the wrong way.

Match the Fix to the Image

  • It's a photo? Leave PNG entirely. Convert to JPEG or WebP at quality 75–85. This is where "PNG compression isn't working" usually ends: a 5 MB PNG photograph becomes a 300 KB WebP that looks the same. An Auto mode that routes non-JPEG input to WebP makes this decision for you.
  • It's a screenshot or UI graphic with transparency? WebP (lossless or high-quality lossy) keeps the alpha channel and typically halves the size.
  • It's an icon/graphic that must stay PNG? Then the real optimization is *palette quantization* (reducing to ≤256 carefully-chosen colors) with a dedicated PNG optimizer — not a generic re-encode. If a tool doesn't do quantization, it can't meaningfully shrink an already-good PNG.

The Rule of Thumb

When a "compress PNG" step barely helps or goes backwards, that's the format telling you it's the wrong container for this content. Don't fight the encoder — change the format. The decision tree is short: photo → JPEG/WebP; transparency needed → WebP; hard PNG requirement → palette quantization or accept the size.

And whichever branch you take, compare the before/after sizes per file — any honest tool shows both numbers so a regression can never sneak into production.