<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by" -->

---
title: I thought AVIF would make every image smaller. It didn’t.
description: Switching from WebP to AVIF doesn't always reduce file sizes. While general images saw dramatic savings (65% overall, some over 90%), 18 out of ~300 portfolio...
canonical: https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I thought AVIF would make every image smaller. It didn’t. | daily.dev
og:description: Switching from WebP to AVIF doesn't always reduce file sizes. While general images saw dramatic savings (65% overall, some over 90%), 18 out of ~300 portfolio...
og:url: https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by
og:image: https://api.daily.dev/og/posts/dbb3Vg3bY.png
og:image:alt: I thought AVIF would make every image smaller. It didn’t.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I thought AVIF would make every image smaller. It didn’t.

**[Blogging and all that Malarkey](https://daily.dev/sources/stuffandnonsense)** · 3 min read · 9 upvotes · 4 comments

## Summary

Switching from WebP to AVIF doesn't always reduce file sizes. While general images saw dramatic savings (65% overall, some over 90%), 18 out of ~300 portfolio images actually grew larger after conversion — in one case nearly tripling in size. The culprit: images with complex alpha transparency and text, which WebP already compressed efficiently. AVIF excels with photographic content but can underperform on graphics with large transparent areas. The takeaway is to always verify file size and visual quality before committing to a new format rather than assuming the newer format is universally better.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://stuffandnonsense.co.uk/blog/webp-to-avif-gotcha>

## Questions this post answers

### Why did some of my images get bigger after converting from WebP to AVIF?

Images with complex alpha transparency and text graphics can compress worse in AVIF than WebP, even though AVIF is usually more efficient overall. In one case, a portfolio image grew from 63KB to 181KB after conversion, and eighteen out of roughly 300 portfolio images ended up larger in AVIF than their original WebP versions.

_Anyone weighing AVIF against WebP for a real project can compare experiences like this on daily.dev._

### Is AVIF always smaller in file size than WebP?

No, AVIF is generally more efficient than WebP but not universally smaller. Photographs with subtle detail often compress much better in AVIF, with reductions of over 90% in some cases, but images containing text and large areas of alpha transparency sometimes compress worse in AVIF than they did in WebP.

_Developers deciding between image formats can track real-world tradeoffs like these on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@codagonist** · 1 upvotes

> Good timing I came across this article. Was thinking of doing a similar webp -> avif swap. Hm, perhaps I'll stay on the webp train..

**@pdfopsdev** · 0 upvotes

> This matches what we see rasterizing document assets: AVIF wins on photographic content but loses on flat-color graphics with text and alpha, because its lossy path smears high-frequency edges and stores alpha as a separate plane that doesn't compress like the color one. Blanket format swaps are the trap — the only reliable approach is encoding both AVIF and WebP per image and keeping whichever is actually smaller. A 3x regression on a logo is a strong tell you had a lossless-friendly image to begin with.

**@neoscripter** · 0 upvotes

> Hey, did you actually try to reduce the quality of avif images before comparing? Their killer feature is that you can compress the hell out of it and they still look okay.
>
>
> In my projects, I compress avif images to 50% of original quality and they look exactly the same. With webp, I can get away only with 80%. I use both images with a picture tag because not all browsers support avif yet.

## Similar posts on daily.dev

- [Switching my website images from WebP to AVIF](https://daily.dev/posts/switching-my-website-images-from-webp-to-avif-cxnwiilat) · Blogging and all that Malarkey · 18 upvotes · 5 comments
- [Serving AVIF, Working in JPG: A Developer's Guide to Living Between Image Formats](https://daily.dev/posts/serving-avif-working-in-jpg-a-developer-s-guide-to-living-between-image-formats-c4rct7c3y) · SitePoint · 8 upvotes · 0 comments
- [Failure of the week: encoding images to AVIF without keeping the originals](https://daily.dev/posts/failure-of-the-week-encoding-images-to-avif-without-keeping-the-originals-dyeddgd2n) · Sylvain Kerkour · 6 upvotes · 0 comments
- [How to Optimize Your WordPress Images for Maximum Speed \(Compression \+ WebP/AVIF\)](https://daily.dev/posts/how-to-optimize-your-wordpress-images-for-maximum-speed-compression-webp-avif--aafcvphmm) · WP Mayor · 1 upvotes · 1 comments
- [Image formats: Codecs and compression tools](https://daily.dev/posts/image-formats-codecs-and-compression-tools-cfsurcohv) · MDN Blog · 2 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev)

[View this post on daily.dev](https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I thought AVIF would make every image smaller. It didn’t.","url":"https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by"},"datePublished":"2026-07-12T20:16:08.710Z","dateModified":"2026-09-14T08:01:52.922Z","description":"Switching from WebP to AVIF doesn't always reduce file sizes. While general images saw dramatic savings (65% overall, some over 90%), 18 out of ~300 portfolio...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e191661d7ea3e6eb1ac87d52e2b5b01c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e191661d7ea3e6eb1ac87d52e2b5b01c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Blogging and all that Malarkey","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Blogging and all that Malarkey","logo":"https://media.daily.dev/image/upload/s--EAFiC7C---/f_auto/v1764512231/logos/stuffandnonsense","url":"https://daily.dev/sources/stuffandnonsense"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"webdev","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Blogging and all that Malarkey","item":"https://daily.dev/sources/stuffandnonsense"},{"@type":"ListItem","position":3,"name":"I thought AVIF would make every image smaller. It didn’t."}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by","comment":[{"@type":"Comment","text":"Good timing I came across this article. Was thinking of doing a similar webp -&gt; avif swap. Hm, perhaps I’ll stay on the webp train…","datePublished":"2026-07-13T07:08:22.791Z","url":"https://daily.dev/posts/dbb3Vg3bY#c-VE1MrRIXu","author":{"@type":"Person","name":"codagonist","url":"https://daily.dev/codagonist","image":"https://media.daily.dev/image/upload/s--ynHsGojZ--/f_auto/v1767932812/avatars/avatar_xDH2kQR3_7?_a=BAMAMiZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"This matches what we see rasterizing document assets: AVIF wins on photographic content but loses on flat-color graphics with text and alpha, because its lossy path smears high-frequency edges and stores alpha as a separate plane that doesn’t compress like the color one. Blanket format swaps are the trap — the only reliable approach is encoding both AVIF and WebP per image and keeping whichever is actually smaller. A 3x regression on a logo is a strong tell you had a lossless-friendly image to begin with.","datePublished":"2026-07-13T18:08:31.260Z","url":"https://daily.dev/posts/dbb3Vg3bY#c-ZNYainNJb","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"}},{"@type":"Comment","text":"Hey, did you actually try to reduce the quality of avif images before comparing? Their killer feature is that you can compress the hell out of it and they still look okay.\nIn my projects, I compress avif images to 50% of original quality and they look exactly the same. With webp, I can get away only with 80%. I use both images with a picture tag because not all browsers support avif yet.","datePublished":"2026-07-13T23:03:15.235Z","dateModified":"2026-07-13T23:03:32.896Z","url":"https://daily.dev/posts/dbb3Vg3bY#c-fXFR9E0qe","author":{"@type":"Person","name":"Ilya Andreev","url":"https://daily.dev/neoscripter","image":"https://avatars.githubusercontent.com/u/140309026?v=4"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-thought-avif-would-make-every-image-smaller-it-didn-t--dbb3vg3by#faq","mainEntity":[{"@type":"Question","name":"Why did some of my images get bigger after converting from WebP to AVIF?","acceptedAnswer":{"@type":"Answer","text":"Images with complex alpha transparency and text graphics can compress worse in AVIF than WebP, even though AVIF is usually more efficient overall. In one case, a portfolio image grew from 63KB to 181KB after conversion, and eighteen out of roughly 300 portfolio images ended up larger in AVIF than their original WebP versions. Anyone weighing AVIF against WebP for a real project can compare experiences like this on daily.dev."}},{"@type":"Question","name":"Is AVIF always smaller in file size than WebP?","acceptedAnswer":{"@type":"Answer","text":"No, AVIF is generally more efficient than WebP but not universally smaller. Photographs with subtle detail often compress much better in AVIF, with reductions of over 90% in some cases, but images containing text and large areas of alpha transparency sometimes compress worse in AVIF than they did in WebP. Developers deciding between image formats can track real-world tradeoffs like these on daily.dev."}}]}
```

