The three most common image formats on the web are JPG, PNG and WebP. They are not interchangeable. Picking the right one gives you smaller files and better looking pictures.
JPG (JPEG)
JPG is made for photographs. It uses lossy compression, which throws away detail the eye barely notices. Files are small and every device can open them. It does not support transparency, and repeated saving slowly lowers quality.
PNG
PNG is lossless, so every pixel is kept exactly. It supports transparent backgrounds. That makes it ideal for logos, icons, screenshots and text. For photos, PNG files are many times larger than JPG.
WebP
WebP was created by Google to replace both. It can be lossy or lossless, it supports transparency, and its files are usually 25 to 35 percent smaller than JPG at the same quality. All modern browsers support it. Some older software and many upload forms still do not.
Quick guide
- Photo for a form or email: JPG.
- Logo or image with transparency: PNG.
- Images on your own website: WebP, with JPG as a fallback if needed.
Switching between them
You can convert any of these for free: PNG to JPG, JPG to PNG, WebP to JPG and image to WebP. Remember that converting a JPG to PNG does not restore lost detail.