Picking the wrong image format makes pages slower or pictures uglier. Here is how the three common formats differ and when to use each one.
The short answer
- Use JPG for photographs.
- Use PNG for logos, screenshots, icons and anything that needs a transparent background or sharp edges.
- Use WebP when you want the smallest file for the web and your audience uses modern browsers.
JPG (JPEG)
JPG uses lossy compression: it throws away detail the eye barely notices to make the file small. It is ideal for photos with smooth colour changes. It does not support transparency, and text or sharp lines can look slightly fuzzy at high compression. Every time you edit and save a JPG again, a little more quality is lost.
PNG
PNG uses lossless compression, so nothing is thrown away and edges stay crisp. It supports transparency, which is why logos and icons are usually PNGs. The price is size: a photo saved as PNG is often several times larger than the same photo as a JPG.
WebP
WebP can do both lossy and lossless compression, and it supports transparency. At a similar look it is usually smaller than JPG or PNG, which helps pages load faster. Almost all current browsers show it, but some older programs and e-mail clients do not, so keep a JPG or PNG when the picture leaves the web.
Comparison at a glance
- Photos: JPG or WebP.
- Transparent logo: PNG or WebP.
- Screenshot with text: PNG.
- Smallest size for a website: WebP.
- Maximum compatibility: JPG and PNG.
Convert between formats
- Turn a transparent-friendly PNG into a smaller JPG with PNG to JPG. Remember that transparent areas become a solid colour.
- Turn a JPG into a PNG with JPG to PNG when you need to keep edits lossless from now on. This does not bring back detail that the JPG already lost.
- Create modern, lightweight images with the WebP Converter.
- After converting, shrink the file further with Compress Image.
A simple workflow for websites
- Keep your original at full quality.
- Resize it to the size it will actually be shown at.
- Export photos as JPG or WebP, and graphics as PNG or WebP.
- Compress the result and check that it still looks good.