JPEG vs WebP vs AVIF: File Size Test

JPEG vs WebP vs AVIF tested on six photos at equal quality: AVIF was 62 percent smaller, WebP 32 percent. See our method, browser support and a calculator.

Share this post
7 min read

Last updated December 3, 2026

In our test of six photos at the same visual quality, WebP files were 32 percent smaller than JPEG. AVIF files were 62 percent smaller. JPEG was still the fastest to make and works everywhere.

We publish the full method below, so you can check it or repeat it. You will also see why a quality setting of 80 means different things in each format.

Key Takeaways

  • At the same quality, AVIF was the smallest for all six photos we tested.
  • WebP was always smaller than JPEG, by 25 to 46 percent.
  • The same quality number is not the same quality across formats.
  • AVIF took about twice as long as WebP to encode in our test.
  • Use AVIF with a WebP or JPEG fallback for the best mix of size and support.

Digieh image format savings calculator

Digieh tool. Estimates use average savings from our own test on December 3, 2026. WebP was 32.0 percent and AVIF 61.6 percent smaller than JPEG at the same quality. Your photos may differ.

What Did the File Size Test Show?

Each format was set to the lowest quality that still scored 0.95 on structural similarity (SSIM). This common measure shows how close a copy looks to the original. So every file looks about the same.

PhotoJPEGWebPAVIF
Laundry room101 KB74 KB (27 percent less)48 KB (52 percent less)
Restaurant table128 KB90 KB (30 percent less)50 KB (61 percent less)
Workbench77 KB58 KB (25 percent less)32 KB (58 percent less)
Office desk53 KB29 KB (46 percent less)17 KB (68 percent less)
Shop labels89 KB49 KB (45 percent less)24 KB (74 percent less)
Sneakers87 KB64 KB (26 percent less)35 KB (60 percent less)
Total534 KB363 KB (32 percent less)205 KB (62 percent less)

Source: Digieh test, December 3, 2026, with Pillow 12.3.0, libwebp 1.6.0 and libavif 1.4.2. Six 1438 by 810 photos, matched at a similarity score of 0.95.

62%How much smaller AVIF was than JPEG at the same quality. Digieh tested six photos on December 3, 2026.

The office desk and shop label photos saved the most. Both have large smooth areas, which newer formats handle well.

How Did We Run the Test?

  1. We took six photos from our own articles, saved without any loss as PNG files.
  2. Each photo was 1438 by 810 pixels.
  3. For each format, we found the lowest quality with a similarity score of 0.95 or higher.
  4. We saved the size of that file and timed how long it took to make.
  5. We also saved each format at quality 80, a common default.

JPEG used progressive mode with optimized tables. WebP used its slowest, best setting, method 6. AVIF used the default speed in Pillow.

from PIL import Image
img = Image.open("photo.png").convert("RGB")
img.save("photo.jpg", "JPEG", quality=65, optimize=True, progressive=True)
img.save("photo.webp", "WEBP", quality=78, method=6)
img.save("photo.avif", "AVIF", quality=45)

The quality numbers in this code are examples from one photo. The right number changes from photo to photo.

Try this today. Run the code on one of your own photos. Compare the three file sizes, then open each file and check that it still looks sharp.

Why Is AVIF Bigger at Quality 80?

This trips up many people. Each format has its own quality scale. Quality 80 in AVIF is much higher quality than quality 80 in WebP.

FormatTotal at quality 80Total at matched quality
JPEG781 KB534 KB
WebP454 KB363 KB
AVIF648 KB205 KB

Source: Digieh test, December 3, 2026, same six photos and Pillow encoders.

At quality 80, our AVIF files were bigger than WebP. At matched quality, AVIF was far smaller. Always compare formats by how they look, not by the quality number.

Which Format Encodes Fastest?

FormatAverage time per photo
JPEG12 ms
WebP140 ms
AVIF283 ms

Source: Digieh test, December 3, 2026, average of three runs per photo on our cloud test machine with Pillow.

JPEG is by far the fastest. AVIF was about twice as slow as WebP here, but that only matters when you convert many images at once.

For a blog, you convert each image once. A fraction of a second is a small price for a much smaller file.

Do All Browsers Support WebP and AVIF?

FormatGlobal supportChromeFirefoxSafariEdge
WebP97.32 percent326516.018
AVIF96.71 percent859316.4121

Source: Can I use, WebP and Can I use, AVIF, read December 3, 2026. Numbers show the first fully supported version.

Almost all users can see both formats today. MDN still suggests a fallback for AVIF, because older devices exist.

Source: MDN Web Docs, Image file type and format guide, read December 3, 2026.

Free updates

Join the Digieh list

Be the first to know when our weekly brief launches.

No spam. Unsubscribe anytime. Read our Privacy Policy.

How Do You Serve AVIF With a Fallback?

Use the picture element. The browser picks the first format it supports, so older browsers get WebP or JPEG.

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" width="1438" height="810" alt="Describe the photo">
</picture>

Always set width and height on the image. This stops the page from jumping while it loads.

Fighting layout shifts or slow loads? See our guide to the LCP issue: longer than 2.5s report.

Can You Use AVIF in WordPress?

Yes. WordPress added AVIF support in version 6.5, as long as your server’s image library supports it.

Source: Make WordPress Core, WordPress 6.5 adds AVIF support, read December 3, 2026.

You can check this in Tools, then Site Health, then Info, under the media section. If AVIF is missing, ask your host to update the image library.

If uploads fail, read our guide on the file type not permitted error.

What About PNG?

PNG keeps every pixel exactly, so it is great for logos and screenshots. For photos, it makes very large files.

FormatTotal size of our six photos
PNG, lossless7713 KB
JPEG, matched quality534 KB
AVIF, matched quality205 KB

Source: Digieh test, December 3, 2026, with Pillow optimized PNG and the matched quality files above.

Our PNG files were about 37 times bigger than the AVIF files. Never upload photos as PNG unless you need every pixel exact. Convert them to AVIF or WebP first.

How Much Does This Matter for Page Speed?

Images are often the heaviest part of a web page. Smaller files download faster, especially on slow mobile data.

Try the calculator at the top with your own numbers. A page with 2,000 KB of photos could save about 1,232 KB per visit with AVIF, based on our test.

Smaller images also help your largest image show sooner. That can improve how fast the page feels to visitors.

Which Format Should You Use?

UseBest choiceWhy
Blog and product photosAVIF with fallbackSmallest files in our test
Simple setup, one fileWebPSmall files and near universal support
Email and old systemsJPEGWorks everywhere
Logos with transparencyWebP or PNGSharp edges and clear background

Source: Digieh test, December 3, 2026, and MDN image format guide.

Want a quick win without code? Use our free image compressor and see our tips to speed up a WordPress site.

Which format does your site use most today?

  • JPEG
  • PNG
  • WebP
  • AVIF
  • Not sure

Test Yourself

In our test, how much smaller was AVIF than JPEG at the same quality?

  1. About 10 percent
  2. About 62 percent
  3. About 95 percent

Across six photos matched at a similarity score of 0.95, AVIF totaled 62 percent less than JPEG.

Why can AVIF look bigger than WebP at quality 80?

  1. AVIF is always bigger
  2. Each format uses its own quality scale
  3. WebP removes color

Quality 80 in AVIF is a much higher quality level, so the file is larger.

Frequently Asked Questions

Is AVIF better than WebP?

For file size, yes. In our test AVIF was smaller than WebP for every photo at the same quality. WebP encodes faster and has slightly wider support.

Is WebP smaller than JPEG?

Yes. Our WebP files were 25 to 46 percent smaller than JPEG at the same quality.

Does AVIF lose quality?

AVIF is usually lossy, like JPEG. At matched quality, our AVIF files looked as close to the original as the JPEG files.

Should I still keep JPEG files?

Keep JPEG as a fallback and for email, where newer formats may not show.

Conclusion

AVIF gave the smallest files in our test, WebP came second and JPEG came last. Serve AVIF with a fallback, and judge quality by eye, not by the number.

Editor’s Note

This test is accurate as of December 3, 2026. Digieh ran it with the tools and settings listed above. Results depend on the photo and the encoder, so test a few of your own images too.

Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.

Keep exploring

Your next read is waiting

Found this useful?

Share this post
Avatar photo

Syed Wasif Raza

Syed Wasif Raza is the founder and editor of Digieh. He writes about health, food, lifestyle, news and sports in plain, easy English. Every guide he publishes is checked against official sources such as government and health agency pages. Connect with him on LinkedIn.

Articles: 1005

Leave a Reply

Your email address will not be published. Required fields are marked *