# Support for AVIF image format

**URL:** <https://forum.ghost.org/t/support-for-avif-image-format/16864>\
**Category:** Ideas\
**Created:** [September 2, 2020, 11:08am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864 "2020-09-02T11:08:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Calin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/robert_calin/32/1744_2.png) [@Robert\_Calin](https://forum.ghost.org/u/Robert_Calin)\
**Post date:** [September 2, 2020, 11:08am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/1 "2020-09-02T11:08:33Z")

</div>

Using to support AVIF/WEBP as sources.

\*AVIF support: since Chrome 85 it is enabled and in Firefox 80 can be enabled with a flag.

---

<div class="post-metadata">

**Author:** ![BenjaminRancourt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/benjaminrancourt/32/23844_2.png) [@BenjaminRancourt](https://forum.ghost.org/u/BenjaminRancourt)\
**Post date:** [June 24, 2022, 6:47pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/2 "2022-06-24T18:47:17Z")

</div>

As sharp library seems to support AVIF ([sharp - High performance Node.js image processing](https://sharp.pixelplumbing.com/api-output#avif)), would the only missing step to support this format be to add it to the @tryghost/image-transform package? ([Utils/transform.js at 8386ba73f371399bca62c822c585c5f589dcdc8b · TryGhost/Utils · GitHub](https://github.com/TryGhost/Utils/blob/8386ba73f371399bca62c822c585c5f589dcdc8b/packages/image-transform/lib/transform.js#L45-L51))

and this Merge Request : [✨ Added format option to `img-url` helper by SimonBackx · Pull Request #14962 · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/pull/14962) ?

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [June 24, 2022, 9:08pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/3 "2022-06-24T21:08:36Z")

</div>

Firefox has supported AVIF by default since version 93, but it’s not supported in Edge and not supported on Safari on the desktop or iOS. According to “[caniuse.com](http://caniuse.com)”, AVIF is only supported for 69% of users:

> **[AVIF image format | Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/avif)**
>
> "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.

I think it’s reasonable for Ghost to wait until the browser support metric is up to 95% at least.

However, the linked pull request has an interesting idea: What if Ghost had the forward-looking behavior to start storing images in the AVIF now, along with better supported formats? They could be served such that AVIF is delivered if the browser supports to improve performance, while a larger/slower format could be delivered otherwise.

---

<div class="post-metadata">

**Author:** ![baud](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/baud/32/18648_2.png) [@baud](https://forum.ghost.org/u/baud)\
**Post date:** [May 9, 2023, 11:50am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/4 "2023-05-09T11:50:55Z")

</div>

I think I’ve seen a way of displaying different image types e.g. avif for browsers that support it - can’t remember where or when ☹

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [May 9, 2023, 1:35pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/5 "2023-05-09T13:35:35Z")

</div>

It’s definitely possible to provide different image formats with fallbacks. We have a guide here:

> **[How to use responsive images in Ghost themes](https://ghost.org/docs/themes/assets/)**
>
> Ghost themes support automatic image resizing, allowing you to use a minimal handlebars helper to output different image sizes.

Additionally, our VS Code extension has an automatic snippet that will produce most of this code for you.

> **[Ghost - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=TryGhost.ghost)**
>
> Extension for Visual Studio Code - Official Ghost extension for theme development in Visual Studio Code.

---

<div class="post-metadata">

**Author:** ![omichalek](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/omichalek/32/34991_2.png) [@omichalek](https://forum.ghost.org/u/omichalek)\
**Post date:** [February 27, 2025, 2:17pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/6 "2025-02-27T14:17:17Z")

</div>

Hi, please is AVIF support coming to version 6? I briefly tried the current version and uploading AVIF did not work.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [February 27, 2025, 2:25pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/7 "2025-02-27T14:25:16Z")

</div>

Avif support has been there for a while. :)

---

<div class="post-metadata">

**Author:** ![omichalek](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/omichalek/32/34991_2.png) [@omichalek](https://forum.ghost.org/u/omichalek)\
**Post date:** [February 27, 2025, 2:31pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/8 "2025-02-27T14:31:24Z")

</div>

That is strange :/ I will try it again!

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [February 27, 2025, 4:27pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/9 "2025-02-27T16:27:18Z")

</div>

Check for console errors when you try to upload. Check for Ghost log errors when you try to upload. And if you find some, please report back with what they are, a copy of the image (in case it’s just your install), and what type of upload (featured image, post body, product card, etc) you were trying to do.

---

<div class="post-metadata">

**Author:** ![omichalek](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/omichalek/32/34991_2.png) [@omichalek](https://forum.ghost.org/u/omichalek)\
**Post date:** [March 1, 2025, 1:47am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/10 "2025-03-01T01:47:09Z")

</div>

![Screen Shot 2025-03-01 at 02.39.19](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/d/4/d4f8189002e29bdf99de92783b40ca0c5f04f738.png)

I am trying `docker.io/library/ghost:alpine` in the “development” mode

podman logs:

```auto
[2025-03-01 01:38:31] ERROR "POST /ghost/api/admin/images/upload/" 415 14ms

Please select a valid image.

Error ID:
    e1d55ff0-f63d-11ef-88b0-c52ba433ba8f

----------------------------------------

UnsupportedMediaTypeError: Please select a valid image.
    at uploadValidation (/var/lib/ghost/versions/5.101.2/core/server/web/api/middleware/upload.js:213:25)
    at Layer.handle [as handle_request] (/var/lib/ghost/versions/5.101.2/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/lib/ghost/versions/5.101.2/node_modules/express/lib/router/route.js:149:13)
    at /var/lib/ghost/versions/5.101.2/core/server/web/api/middleware/upload.js:93:9
    at Immediate._onImmediate (/var/lib/ghost/versions/5.101.2/node_modules/multer/lib/make-middleware.js:53:37)
    at process.processImmediate (node:internal/timers:478:21)

```

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [March 1, 2025, 2:21am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/11 "2025-03-01T02:21:36Z")

</div>

I stand corrected! I just tried on Ghost Pro, and I also cannot upload AVIF. Which is … weird… because I know it’s possible to write out AVIF with the helper. [How to use responsive images in Ghost themes](https://ghost.org/docs/themes/assets/)

---

<div class="post-metadata">

**Author:** ![omichalek](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/omichalek/32/34991_2.png) [@omichalek](https://forum.ghost.org/u/omichalek)\
**Post date:** [June 6, 2025, 12:09pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/12 "2025-06-06T12:09:51Z")

</div>

With [version 6 approaching](https://activitypub.ghost.org/ramping-up-for-expansion/), is there any chance we will get AVIF support?

---

<div class="post-metadata">

**Author:** ![markstos](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/markstos/32/18182_2.png) [@markstos](https://forum.ghost.org/u/markstos)\
**Post date:** [March 1, 2026, 3:54am UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/13 "2026-03-01T03:54:14Z")

</div>

AVIF is now supported by [95% of](https://caniuse.com/avif)users and is is supported by WordPress.

After migrating WordPress site to Ghost(Pro), I found a few images came through broken and it’s because they were in AVIF format— WordPress supported them but Ghost didn’t.

This is a modern format can result in smaller file sizes than competitors, providing faster downloads and a better experience for Ghost users.

---

<div class="post-metadata">

**Author:** ![muratcorlu](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/muratcorlu/32/38509_2.png) [@muratcorlu](https://forum.ghost.org/u/muratcorlu)\
**Post date:** [March 2, 2026, 2:37pm UTC](https://forum.ghost.org/t/support-for-avif-image-format/16864/14 "2026-03-02T14:37:22Z")

</div>

Ghost doesn’t support uploading image files with “.avif” extension, but it can convert and serve images in avif format. If you use `img_url` helper in your templates and set requested format as “avif”, even though your image file extention stil would be in one of jpeg, webp or png, responded image will be in avif format.
