Transparent images: PNG, WebP and JPG explained
PNG, WebP and JPG handle transparency differently, and choosing wrong bakes in a background you cannot remove. Learn what each format preserves, when to use alpha, and how to export safely.
The format you choose decides whether transparency survives the next step. JPG has no way to store it. PNG and WebP both can. Getting this wrong does not produce an error message — it produces a picture with a white or black rectangle where the background used to be, and by then the original cutout is hard to recover.

JPG cannot carry transparency
JPG stores three colour channels: red, green and blue. There is no fourth channel to say “this pixel is see-through”. When an image with alpha is encoded as JPG, the software has to choose a colour for every transparent pixel. Most tools pick white, some pick black, and a few composite against whatever colour the editor currently shows.
The result is a permanent background. You can no longer place the product on a dark slide or let a page colour show through, because the flat fill is now part of the image data. That is fine if you actually wanted a white product tile. It is a problem if you thought you were just making the file smaller.
JPG is still a good format for photographs without transparency. It is universally supported and compresses continuous-tone images efficiently. The mistake is not using JPG; it is using JPG for a cutout.
PNG keeps alpha exactly
PNG supports an alpha channel and stores it losslessly. Every semi-transparent value you inspected after a background removal stays as it was, including the faint gradient around hair or soft shadows. This makes PNG the right master format for any image whose edge matters.
The trade-off is size. A large photographic PNG can be many times bigger than a comparable JPG, because PNG’s compression is designed for exact pixel preservation rather than photographic approximation. For flat graphics, diagrams, icons and screenshots, that same property is an advantage: text stays crisp and colours stay exact.
If you need to deliver a transparent file and size is not critical, PNG is the safe answer. If size matters, keep the PNG and derive a smaller copy from it.
WebP keeps alpha and compresses better
WebP can carry an alpha channel too, and its lossy mode usually produces much smaller files than PNG for transparent photographic cutouts. It is a strong default for web delivery when you know the target browsers support it, which covers the overwhelming majority of current traffic.
WebP also has a lossless mode. That is useful for flat graphics where you want alpha and exact colours but smaller files than PNG. It is less useful for photographs, where lossy WebP gives a better size-to-quality trade-off.
One subtlety: WebP alpha is still compressed. Very faint alpha values around an edge can be nudged during lossy encoding. Check the cutout against a dark background after conversion, not only on white where the fringe disappears.
What actually happens during conversion
Conversion reads the source pixels and writes a new file in the target format. If both formats support alpha, the fourth channel is carried across. If the target does not, transparent pixels are composited against a chosen fill and the channel is gone. This is why the order of operations matters: remove the background first, keep a transparent master, and only choose a flat fill when you know the final destination.
A reliable sequence is: crop, remove background, export PNG master, derive WebP or JPG copies for delivery. If you also need different dimensions, resize while you still hold the master. The convert format tool is where you make the final format decision; the resize image tool belongs earlier in the chain.
Check the edge after every alpha-relevant change
Background removal models produce good edges but not perfect ones. A pale halo may be invisible on white and obvious on charcoal. A dark outline may sit quietly on a mid-tone page and look like a drawn border on a light one. Conversion can make either problem more noticeable by changing how those semi-transparent pixels are encoded.
Test three backgrounds: white, black, and the real colour the image will sit on. If the edge fails only on one, you may need a different master rather than a different format. Revisit the cutout from the original image instead of trying to patch the converted copy. The remove background tool can produce a fresh PNG master with a different model setting, and that is cheaper than repairing artefacts downstream.
File size expectations
A transparent PNG of a product photo might be several megabytes. The same cutout as lossy WebP might be a few hundred kilobytes with very little visible difference at web size. A JPG with a baked-in white background will be smaller still, but it has traded away flexibility permanently.
Do not compress before you have settled the format. The compression tool uses MozJPEG for JPG, libwebp for WebP and OxiPNG for PNG, and each encoder expects a different kind of input. Running a lossy pass and then converting again adds artefacts for no benefit. Convert first, compress once, then check the result.
Choosing by use case
For a website hero with a transparent subject, use WebP with alpha and keep a PNG master. For a logo or UI element that must stay pixel-exact, use PNG, possibly in its lossless WebP variant. For a printed catalogue page with a fixed white background, JPG is reasonable because the background was always going to be white. For an archive of originals, keep PNG: it preserves the alpha data you may need later.
When in doubt, keep both a master and a delivery copy. The storage cost is small compared with repeating a cutout because the only transparent file was overwritten.
A short checklist
- Confirm whether the image needs transparency at all.
- Keep a PNG master with the alpha channel intact.
- Use WebP with alpha for compact web delivery.
- Use JPG only when a flat background is intentional.
- Inspect edges on white, black and the actual page colour.
- Resize and compress after the format decision, not before.
Transparency is a property of the file, not of the picture you remember seeing. Choose the format that carries the data you still need, and let every later copy descend from a master that still has it.