Lossy vs lossless, in one paragraph
Lossless formats (PNG, lossless WebP) store exactly the pixels you gave them; they shrink files by finding repetition, so flat colours compress superbly and camera noise hardly at all. Lossy formats (JPG, lossy WebP) discard detail your eye is unlikely to miss, which makes photos dramatically smaller but blurs hard edges such as text at low quality. The live test above shows both effects on real bytes.
When to use which
- WebP for images on your own website: photos, product shots, even logos.
- PNG for screenshots, UI mock-ups, images you’ll keep editing, and anything headed to Word, PowerPoint, email or print.
- Both keep transparency, so neither will add a white box behind a logo.