JPG vs PNG vs WebP vs AVIF: which image format to use for what
For anyone who uploads photos to a website, sends screenshots or prepares a logo: which format to pick, with our own test of how much each one weighs.
The short answer to JPG vs PNG: use JPG for photos and PNG for logos, screenshots, images with text and anything that needs a transparent background. And if the image is going on a website, WebP or AVIF is the better choice today: they’re much smaller at similar quality, and current browsers display them without trouble.
We tested it in October 2026 with two images from this site. The same photo weighed 138.6 KB as a JPG, 96.5 KB as a WebP and 1.1 MB as a PNG. And with an image of text, the JPG ended up bigger than the PNG, even though the PNG loses nothing.
JPG vs PNG: what’s the difference?
The difference between JPG and PNG is compression. JPG is lossy: it throws away detail you barely notice in exchange for small files, which is why it’s the format for photos. PNG is lossless and supports transparency, which suits screenshots, logos and text, but a photo saved as PNG is several times bigger.
Think of packing a suitcase. Lossless compression is folding your clothes well: when you arrive, you unpack exactly what you put in. Lossy compression is leaving at home what you probably wouldn’t wear: the suitcase is lighter, but those things don’t travel. In a photo you don’t miss them; in text, you notice.
That’s why MDN’s image file type and format guide, Mozilla’s documentation for developers, recommends lossless formats for screenshots, diagrams and logos. JPG is defined by ITU-T Recommendation T.81, from 1992; PNG is maintained by the W3C, which published its third edition in June 2025.
What is WebP, and is it better than PNG and JPG?
WebP is an image format that Google introduced in 2010 to make web pages load faster. It compresses with or without loss, supports transparency and animation, and is usually smaller than the two classics: lossy WebP replaces JPG, and lossless WebP replaces PNG. For a website, it almost always comes out ahead.
According to Google’s WebP documentation, lossless WebP images are 26% smaller than PNGs. Lossy ones are 25% to 34% smaller than JPEGs of equivalent quality. Our test was in line with that: 30% smaller than the JPG for the photo and 19% smaller than the PNG for the image with text.
Does it work everywhere? In browsers, yes. Safari was the last major browser to add it, in September 2020, and since 2023 WebP has been “widely available” in Baseline, the web’s compatibility label. Outside the browser, an old program may not open it: just convert it to JPG or PNG.
What is AVIF, and is it better than WebP?
AVIF is an image format based on the AV1 video codec, with a specification published by the Alliance for Open Media since 2019. It compresses even more than WebP: in our test, at the same similarity to the original, the photo was half the size of the JPG. Like WebP, it supports transparency and animation.
It has two drawbacks. It’s slower to create: encoding our photo as AVIF took 292 milliseconds on a recent laptop, versus 64 for WebP and 7 for JPG. And it reached browsers later. Edge was the last major browser to display it, in January 2024, and Baseline has listed it as “widely available” since July 2026.
Our recommendation: AVIF if you want the smallest files for large photos; WebP if you’d rather have the simplest, fastest and most compatible option.
Which image format is smallest? We measured it
In our test, AVIF produced the smallest files and WebP came second, both for a photo and for an image with text. PNG was the heaviest for the photo, and JPG did worst on the image with text: it was bigger than the PNG and lost quality too.
We ran it in October 2026 with two images from this site: a photo of a hotel terrace with mountains and a gradient sky, and the card this blog generates for sharing its articles, with text on a dark background. We saved the same pixels in each format with sharp, an open-source image library. Then we used FFmpeg to measure SSIM, an index of similarity to the original where 1 means identical.
| Format | Size | Comparison and similarity (SSIM) |
|---|---|---|
| JPG, quality 80 | 138.6 KB | Reference · 0.987 |
| WebP, quality 80 | 96.5 KB | 30% smaller than the JPG · 0.986 |
| AVIF, quality 50 | 42.6 KB | 69% smaller · 0.978, softer when zoomed in |
| AVIF, quality 64 | 70.9 KB | 49% smaller · 0.987 |
| PNG | 1,121.8 KB | 8 times the JPG · 1, identical |
| Lossless WebP | 782.9 KB | 30% smaller than the PNG · 1, identical |
| Format | Size | Vs. PNG and similarity (SSIM) |
|---|---|---|
| PNG | 34.5 KB | Reference · 1, identical |
| Lossless WebP | 27.9 KB | 19% smaller · 1, identical |
| JPG, quality 80 | 42.1 KB | 22% bigger · 0.996 |
| WebP, quality 80 | 19.7 KB | 43% smaller · 0.999 |
| AVIF, quality 50 | 11.9 KB | 65% smaller · 0.999 |
Zoomed in six times, the JPG version of the card showed speckles around the letters that the PNG and the lossless WebP don’t have.
Watch out: “quality” doesn’t mean the same thing in every format. At the quality 50 that sharp uses by default, AVIF smoothed away fine detail, like the rocks on the mountain; to match the JPG at quality 80, we had to raise it to 64.
Which formats support transparency and animation?
JPG is the only common format with no transparency: save a logo with no background as a JPG and the empty area is filled with a solid color. PNG, WebP and AVIF support it, and GIF only partly (each pixel is either fully visible or invisible). For animation, you can use GIF, WebP, AVIF and animated PNG (APNG).
For animation, an animated WebP or AVIF is smaller than the old GIF, according to Google and MDN. And if a photo has a background you don’t want, our background remover gives it back as a transparent PNG, free and without uploading the image anywhere.
Why are iPhone photos saved as HEIC?
Because the camera is set to HEIF, a format whose files end in .heic. iPhones have used it since iOS 11 (iPhone 7 and later), and Apple recommends it because it compresses better than JPEG and takes up less space with the same visual quality. If you share a photo with a device that doesn’t support the format, the iPhone may send it as a JPEG automatically.
To make the camera save JPGs, open Settings, tap Camera, then Formats, and choose Most Compatible; to switch back, choose High Efficiency. And keep in mind that HEIF is for storing, not publishing: it isn’t one of the image formats Google Search supports.
How do you convert an image to WebP?
To convert an image to WebP, all you need is a program or website that exports the format: choose WebP, set the quality (80 is a good starting point for photos) and download. Start from the original rather than an already compressed JPG, because the losses of the two formats add up.
Without installing anything, you can use our free image compressor. Drop in one or more images (JPG, PNG, WebP or GIF), choose WebP under Format, adjust the Quality and the Max width (1920 pixels by default) if you like, and click Download. It all happens in your browser: the photo is never uploaded to a server.
Starting from the original matters: when we converted our photo to WebP from its JPG version, its similarity to the original dropped to 0.981, versus 0.986 when converting from the original. For AVIF, which our compressor doesn’t export, you can use Squoosh, an open-source web app from Google Chrome Labs that also compresses in the browser.
Which format is best for your business website?
For a business website, what works best today is WebP or AVIF for photos and SVG or PNG for the logo. According to the HTTP Archive’s 2025 Web Almanac, images are the heaviest part of a web page: the median mobile home page loaded 911 KB of them.
Switching formats won’t keep you out of Google: Google Search supports JPEG, PNG, WebP, AVIF, GIF, SVG and BMP, as its Google Images guidelines state. What does count is speed: Google recommends that the main content load within 2.5 seconds (the LCP in its Core Web Vitals guide), and lighter photos help.
Also, don’t upload photos larger than they’re displayed. And remember that speed also depends on where the site is hosted, as we explain in what domains, hosting and DNS are.
What gets exaggerated about JPG, PNG and WebP
- “PNG always looks better.” In a photo, compared with a good JPG, you can barely see the difference, and the PNG is much bigger: 8 times bigger in our test.
- “Converting a JPG to PNG restores its quality.” What the JPG threw away doesn’t come back. When we converted our JPG photo to PNG, the file grew from 138.6 KB to 975.7 KB and its similarity to the original didn’t move: 0.987.
- “A JPG loses quality every time you save it.” The big loss is the first one: after saving the same photo 10 times in a row at quality 80, its similarity barely changed (from 0.9868 to 0.9866). What does add loss is converting it to another lossy format.
Which image format should you use for what?
The quick rule: photos in JPG to send or print, and in WebP or AVIF for a website. Screenshots, logos and images with text in PNG or lossless WebP. And nothing that needs a transparent background in JPG. The table sums it up case by case.
| For… | Best format | Why |
|---|---|---|
| Sending or printing a photo | JPG | Every program and phone opens it |
| Photos on a website | AVIF or WebP | Up to 49% smaller than the JPG |
| Screenshots and images with text | PNG or lossless WebP | Sharp text; the WebP was 19% smaller |
| A logo or an icon | SVG; if you don’t have one, PNG or WebP | Sharp at any size |
| An image with no background | PNG, WebP or AVIF | JPG has no transparency |
| iPhone photos | HEIF to store them; JPG to share them | HEIF takes less space; anyone can open a JPG |
If you remember one thing: the right format depends on what’s in the image and where it’s going.
To try it with your own photos, the Vertize Plus tools include the compressor and the background remover from this article, plus others for scanning documents, making QR codes and creating favicons.
Frequently asked questions
Are JPG and JPEG the same?
Yes: they’re the same format with two extensions. The .jpg version caught on because old systems like MS-DOS only allowed three-letter file extensions.
Why do the images I download save as WebP?
Because the website serves them as WebP so they load faster, and your browser saves the file as it arrived. Any current browser opens it; if a program won’t, convert it to JPG or PNG (renaming the extension isn’t enough).
Do you lose quality when converting to WebP?
It depends on the mode. Lossless WebP keeps every pixel. Lossy WebP at quality 80 was, in our test, almost as close to the original as a JPG at quality 80 (0.986 versus 0.987).