JPG vs PNG
When to use each format — and why they compress so differently.
The one-line answer
Use JPG for photographs and PNG for graphics with flat colour, sharp edges or transparency — logos, icons, screenshots and diagrams.
How they compress (and why it matters)
JPG is lossy. It discards detail your eye barely notices, which makes photos very small — but each re-save loses a little more, and hard edges or text can get fuzzy "artefacts".
PNG is lossless. It stores every pixel exactly, so edges and text stay razor sharp and nothing degrades on re-saving — but photographs stay large because nothing is thrown away. PNG also supports transparency; JPG does not.
Picking by content
- Photo / realistic image → JPG (or WebP). Compress JPG gives big savings with little visible loss.
- Logo, icon, screenshot, diagram, anything with transparency → PNG. Compress PNG optimises it losslessly.
- Need the smallest modern file and control the site → WebP often beats both.
A common mistake
Saving a photograph as PNG produces a huge file for no benefit — PNG can't compress photos well. If your "PNG" is actually a photo, convert it to JPG or WebP and it will shrink enormously. Likewise, saving a crisp logo as JPG adds ugly artefacts around the edges; keep it PNG.
Getting the smallest file
Whatever the format, exported images are usually saved at higher quality than needed. Run the file through the matching compressor and, if you need a specific size, set a KB target.