For most website images, WebP is a strong default: it handles photos and graphics, supports transparency, and files are usually smaller than the same picture in JPEG or PNG. JPEG remains a safe, universal choice for photographs. PNG suits images that need sharp edges, text or transparency without any loss of detail.
Why it matters
The format decides how many bytes a picture takes. Smaller files load sooner, which helps visitors on slow connections. The wrong format can also make a picture look rough, such as a screenshot saved as JPEG with blurry edges around text.
How they differ
- JPEG: lossy compression, built for photographs. It has no transparency. Every browser and tool supports it.
- PNG: lossless compression, so no detail is discarded. It supports transparency. It is a good fit for screenshots, line art and images with text, but photographs saved as PNG are often heavy.
- WebP: supports lossy and lossless compression, transparency and animation. Current major browsers support it. Files are usually smaller than comparable JPEG or PNG files, though the saving varies by image.
Lossy means some detail is thrown away to save space. Lossless means the picture can be rebuilt exactly.
How to choose
- Is it a logo or simple icon? Use SVG if you can, since it stays sharp at any size.
- Is it a photograph? Use WebP, or JPEG where you need the widest support.
- Does it have text, sharp edges or transparency? Use WebP lossless or PNG.
- Convert, then compare the result against the original by eye at the size it is displayed.
- Keep the original, and convert from it each time.
<picture>
<source srcset="/img/photo.webp" type="image/webp">
<img src="/img/photo.jpg" alt="Harbour at sunrise" width="1200" height="800">
</picture>
The picture element lets a browser pick WebP and fall back to JPEG if it must. Crawvix Image Doctor has an Optimize my images button that converts JPEG and PNG pictures to WebP in a ZIP.
Common mistakes
- Saving a screenshot or logo as JPEG and getting blurry edges.
- Converting a JPEG to PNG, which adds size but not quality.
- Re-saving a lossy file several times.
- Replacing files without updating their references on the pages.
Frequently asked questions
Is WebP supported everywhere?
All current major browsers support it. If you need to cover very old software, use the picture element with a JPEG or PNG fallback.
What about AVIF?
AVIF is a newer format that can be smaller still and is supported by current major browsers. Encoding can be slower, and tool support is less universal.
Does the format affect SEO?
Not directly. Google can index these formats. The effect comes through page speed and image quality.
Related guides
- Which image format to use
- WebP and AVIF image optimization
- Compress images for the web
- Image compression tools compared
To see which of your images could be lighter, Try the free website sample.