
Every image on a website is saved in a format, and the format decides how big the file is and how it looks. Most people never choose one: the camera saves JPEG (named after the Joint Photographic Experts Group that created it), the screenshot tool saves PNG (Portable Network Graphics), and both get uploaded as they are. That is usually the heaviest thing on the page.
The short answer: use WebP, an image format Google created for the web, for almost every image on a website. It handles photos, screenshots and transparent logos, and it is smaller than JPEG and PNG. Keep PNG for favicons and email, JPEG for social share images and email photos, and SVG (Scalable Vector Graphics) for logos and icons that exist as vector files, meaning drawn from shapes rather than pixels.
- JPEG — lossy, made for photos, no transparency
- PNG — lossless, sharp text and transparency, but large
- WebP — either, chosen when saving, and smaller than both
- Our numbers — 81 files went from 14.81 MB to 2.60 MB when we converted them
What’s the difference between PNG, JPEG and WebP?
The difference is how each one compresses the picture. Lossy compression throws away detail the eye is unlikely to miss, which makes files much smaller. Lossless compression keeps every pixel exactly, which keeps text and sharp edges crisp but costs size. The image file type and format guide in MDN Web Docs, Mozilla’s reference for web developers, sums up the older two:
JPEG is lossy, so it is often a good fallback format for photographs, while PNG is lossless, making it better for screenshots, diagrams, and line art.
WebP does both. The same guide says “WebP and AVIF support both lossy and lossless compression as a setting you choose when encoding,” and that WebP supports transparency and animation too. Its advice for raster images (pictures made of pixels, as opposed to vector drawings) is direct: “prefer WebP or AVIF, which generally provide better compression than PNG, JPEG, and GIF.” AVIF (AV1 Image File Format) is a newer format built on the AV1 video codec, and GIF is the old format best known for short animations.
| Format | Compression | Transparency | Best for |
|---|---|---|---|
| JPEG | Lossy | No | Photos in email, social share images |
| PNG | Lossless | Yes | Favicons, logos in email |
| WebP | Lossy or lossless | Yes | Almost every image on a web page |
How much smaller is WebP?
A week after we moved this site off WordPress, 83 of its 88 images were still PNG or JPEG. We converted 81 of them to WebP, and they went from 14.81 MB to 2.60 MB, 82% less. The biggest image went from 1,438 KB as a PNG to 59 KB as a WebP. (A KB, or kilobyte, is a thousand bytes; an MB, or megabyte, is a thousand KB.)
Some of that saving came from the originals being oversized, so we also ran a fair test for this post. We took the photo below, scaled it to 1600×1067 pixels and saved it in each format. For the lossy formats, we lowered the quality setting as far as it would go while the result stayed equally close to the original. “Equally close” was measured with SSIM (the Structural Similarity Index), a score designed to compare two images roughly the way the eye does, where 1 means identical. Every lossy file in the table scores 0.97.

| Format | File size | Time to save |
|---|---|---|
| PNG (lossless) | 1,707 KB | 1.5 s |
| WebP (lossless) | 1,277 KB | 3.7 s |
| JPEG | 217 KB | 0.06 s |
| WebP | 189 KB | 0.95 s |
| AVIF | 121 KB | 3.8 s |
The same photo, saved in each format. The two lossless files keep every pixel; the three lossy ones are the smallest files that still score 0.97 for similarity. Time to save is how long our computer took to create each file, in seconds.
Two things stand out. A photo saved as PNG is eight times the size of the same photo as JPEG, which is why a screenshot tool’s default is the wrong choice for photos. And at equal quality, WebP was 13% smaller than JPEG here. That is less than the 82% above, which mostly came from fixing PNGs and oversized files. The photo started life as a JPEG download, which flatters JPEG a little.
When PNG or JPEG still wins
Our website rule became “WebP is the default, not a blanket rule,” because two kinds of file came out heavier as WebP during the conversion:
- A JPEG that was already tightly compressed — saving it as WebP at the usual quality made it bigger. Our converter now steps the quality down until WebP actually wins, and never ships a file heavier than the original
- A flat screenshot full of text — one dark-mode screenshot of a web page was smaller as a PNG than at every lossy WebP setting we tried, and the low settings blurred its text. Re-testing it for this post, lossless WebP did win, 18.9 KB against 24.0 KB. For screenshots and diagrams, use lossless WebP, not lossy
Outside the page itself, three places still need the older formats. Favicons and the Apple touch icon stay PNG, the safe choice for icons. The image shown when a page is shared on WhatsApp or LinkedIn is a JPEG copy of each hero, since no visitor downloads it and link-preview tools vary in what they accept. And email gets PNG and JPEG only, covered in the FAQ below.
Picking the format is half of it. The other half is size: a 4,000-pixel photo displayed 800 pixels wide is wasted in any format. Resize to the largest size the page shows it at, then convert. If a slow site is the wider problem, Web Hosting and Website Builders: How to Get Your Site Online covers what else decides it.
Also Read: Switching From WordPress to Astro: What the Move Actually Involves
Key Takeaways
- JPEG is lossy and made for photos, PNG is lossless and made for sharp edges, and WebP can be either.
- Converting this site’s images to WebP cut them from 14.81 MB to 2.60 MB.
- Check every conversion: an already-tight JPEG can come out heavier as WebP.
- Use lossless WebP for screenshots and diagrams, and lossy WebP for photos.
- Keep PNG for favicons and email logos, and JPEG for share images and email photos.
Frequently Asked Questions
Should I use AVIF instead of WebP?
It depends on how much work you want to put into each image. In our test above, AVIF came out 36% smaller than WebP at the same measured quality, but took about four times as long to encode. MDN says AVIF is not quite as well supported in browsers and does not support progressive rendering, and advises including a fallback in a better-supported format. We stay on WebP because it needs no fallback markup.
Does converting a JPEG to WebP lose quality?
A little, if you convert it to lossy WebP, because the image is compressed a second time. The detail JPEG already threw away doesn’t come back, and WebP throws away a bit more. Convert from the largest, least compressed original you have, keep that original, and check the result at full size before replacing anything.
Can I use WebP images in emails?
Not safely yet. Caniemail, which tracks email client support, estimates 97.62% support for WebP, but that includes partial support and its WebP tests date from 2021. Outlook desktop on Windows doesn’t render it, which is why the logo in this site’s own emails is a PNG. Use JPEG for photos in email and PNG for logos.
Is SVG better than PNG for logos?
Usually, if the logo exists as a vector file. MDN calls SVG ideal for diagrams, icons, and other images which can be accurately drawn at any size, because it scales smoothly to whatever size it is shown at. A photo-like logo or a logo that only exists as a raster file stays PNG or lossless WebP.
Does the image format affect SEO?
Only through speed and support, as far as SEO (search engine optimization) goes. Google’s image SEO best practices say Google Search supports images in BMP (bitmap), GIF, JPEG, PNG, WebP, SVG and AVIF, so any of the common formats can be indexed. A smaller format makes the page load faster, and Google also advises that the file name’s extension should match the file type.
Final Thoughts
Image format is one of the few speed fixes that needs no developer and no new software: most image editors and free converters save WebP. Convert the biggest images first, compare each result with the original, and keep the handful of exceptions where they belong.
Is your website heavier than it needs to be?
ClubUnbrick builds fast business websites, with every image sized and saved in the right format from the start.
What We Offer
- Website design and development — Fast, mobile-first sites set up to rank on Google.
- Speed fixes — Images, scripts and fonts trimmed on an existing site.
- Migrations — Moving a slow site to a faster setup without losing its pages or rankings.
Not sure what is slowing your site down? Our free brand audit looks at its speed.

- Free guide
- 15-page PDF
Everything in plain English, from what Astro is to launch day. Free to download.
Get the free guide
