# Replace JPEG with newer image formats (.WebP, .AVIF, .JXL)

**URL:** <https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776>\
**Category:** Suggestions\
**Created:** [February 28, 2024, 6:00pm UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776 "2024-02-28T18:00:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NameLessGO](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/namelessgo/32/34298_2.png) [@NameLessGO](https://forums.ankiweb.net/u/NameLessGO)\
**Post date:** [February 28, 2024, 6:00pm UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776/1 "2024-02-28T18:00:00Z")

</div>

Pros:

- AnkiWeb will consume less space, which should save costs in hosting in long term
- Users will use more images without worrying about storage
- Syncing images will be faster (less size, more speed)

Resources:

- Codec Comparisons:[#1](https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_image_codecs) [#2](https://cloudinary.com/blog/contemplating-codec-comparisons) [#3](https://siipo.la/blog/whats-the-best-lossless-image-format-comparing-png-webp-avif-and-jpeg-xl) [#4](https://front.space/blog/what-is-jpeg-xl-how-is-it-superior-to-avif-and-webp/)
- [AVIF: Can I use?](https://caniuse.com/avif): 89.09%
- [WebP: Can I use?](https://caniuse.com/?search=webp): 97.06%
- [JPEG XL: Can I use?](https://caniuse.com/?search=JPEG%20XL): 10.5% (damn you [Google](https://www.techspot.com/news/101764-google-once-again-accused-snubbing-jpeg-xl-image.html))
- [Paste Images As WebP](https://ankiweb.net/shared/info/1151815987) (Anki Add-on)

_Until JPEG XL rolls out in Chromium browsers_, Anki can use JPEG XL by default and rollback to AVIF or WebP for AnkiWeb

Last discussion and Issue tracker: [Supported media not properly counted for shared decks - #2 by dae](https://forums.ankiweb.net/t/supported-media-not-properly-counted-for-shared-decks/22500/2)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/2/3/23f6a9b27ac09eeff8ec181f21aa2d9bb52358d7.jpeg)  
Source: [It’s High Time to Replace JPEG With a Next-Generation Image Codec](https://cloudinary.com/blog/time_for_next_gen_codecs_to_dethrone_jpeg?ref=front.space)

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [March 1, 2024, 11:52am UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776/2 "2024-03-01T11:52:57Z")

</div>

I looked into Webp a bit when I asked about it earlier in this Forums.

- I think the current Anki is not able to convert Jpeg to Webp. Perhaps an additional module is needed.(dwebp, PIL?)

- Using the same method as “Paste images As Webp” add-on, there is a problem that animated Pngs and Gifs are converted to static images.(Although not jpeg)

- The latest AnkingV12 deck already converts images to webp, but it seems that some media are not converted to webp because they are required to be high quality rather than size.

- If all the jpegs and pngs in the Anking deck(V11) were converted to webp, it seems that a 3G deck becomes about 1G.

---

<div class="post-metadata">

**Author:** ![NameLessGO](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/namelessgo/32/34298_2.png) [@NameLessGO](https://forums.ankiweb.net/u/NameLessGO)\
**Post date:** [March 1, 2024, 6:15pm UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776/3 "2024-03-01T18:15:18Z")

</div>

Originally this post was only about JXL, but because of the lower adoption decided to talk about others, but JXL is the one I’m truly hyped about

While WebP and AVIF are great alternatives, JXL have backwards compatibility with JPEG

> A unique feature of JPEG XL is that it is possible to recompress existing JPEG images (of which there are a **lot** out there!) to a JPEG XL file that is on average about 20% smaller, without introducing any loss. In fact, the bit-exact same JPEG file can be reconstructed from the JPEG XL file.  
> [The Case for JPEG XL](https://cloudinary.com/blog/the-case-for-jpeg-xl)  
> TLDR: JXL ↔ JPEG

JPEG XL for clients and convert to JPEG (instead of AVIF/WebP) for Ankiweb until Google/Chromium browsers supports it

> **[JPEG XL](https://jpegxl.info/)**
>
> Community home page for the JPEG XL image format and libjxl

---

<div class="post-metadata">

**Author:** ![jambamboleo](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jambamboleo](https://forums.ankiweb.net/u/jambamboleo)\
**Post date:** [June 14, 2024, 9:37pm UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776/4 "2024-06-14T21:37:16Z")

</div>

Maybe – hopefully – there’s a way to use [qjpegxl6](https://github.com/novomesk/qt-jpegxl-image-plugin) to display JPEG-XL files. I’ve placed the .dll in `AppData\Local\Programs\Anki\lib\PyQt6\Qt6\plugins\imageformats\` but it seems that that is not enough.

---

<div class="post-metadata">

**Author:** ![AnkiQueen](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@AnkiQueen](https://forums.ankiweb.net/u/AnkiQueen)\
**Post date:** [October 31, 2026, 6:21pm UTC](https://forums.ankiweb.net/t/replace-jpeg-with-newer-image-formats-webp-avif-jxl/41776/5 "2026-10-31T18:21:38Z")

</div>

Chrome announced that they will adopt jpegxl

> **[Shipping JPEG XL in Chrome  |  Blog  |  Chrome for Developers](https://developer.chrome.com/blog/jpeg-xl-in-chrome)**
>
> JPEG XL offers better compression than JPEG, built-in HDR support, lossless JPEG transcoding, and more.
