You export a beautiful transparent logo, run it through a compressor to make it web-friendly, and the version that comes out has a solid white rectangle behind it. Nothing "broke" — the file was simply converted to a format that cannot store transparency.
Why Transparency Disappears
Transparency lives in the alpha channel — a fourth value per pixel alongside red, green and blue. Formats differ in whether they can store it:
- PNG: full 8-bit alpha. The safe default, but big.
- JPEG: no alpha channel at all. Any converter targeting JPEG must flatten transparent pixels onto a background color — usually white, sometimes black.
- WebP: full alpha support *plus* modern compression. Typically 60–80% smaller than the equivalent PNG.
So the rule is simple: if the image must stay transparent, JPEG is never an option, no matter how tempting its small size is.
The Right Way to Shrink a Transparent PNG
- Convert to WebP instead of "compressing the PNG". PNG is lossless; there is only so much a recompressor can do. Converting the same pixels to WebP with alpha intact routinely turns a 300 KB logo into a 40 KB file that looks identical. In ImageHow's Compress Image tool, pick WebP (or Auto) as the output format — transparency is preserved automatically.
- Resize before you compress. A logo displayed at 320 px wide doesn't need a 2000 px source. Halving dimensions divides the pixel count by four — no format trick beats that.
- Keep a PNG fallback only if you must support very old software. Every current browser, including mobile, renders WebP.
When You Actually Want the Background Flattened
Sometimes the transparent version is the wrong deliverable — an avatar upload or a form that requires JPG. In that case flatten deliberately: put the logo on the background color *you* choose, then export JPEG. Doing it on purpose beats letting a converter pick white for you. (If you need the reverse — removing a background to create transparency — a chroma-key based Remove Background tool does that in the browser too.)
Quick Checklist
- Needs transparency → WebP (small) or PNG (legacy-safe). Never JPEG.
- Photo with no transparency → JPEG or WebP, whichever is smaller.
- Icon that scales → consider SVG instead of any raster format.
Get the format decision right first, and "compressing without losing transparency" stops being a problem at all.