avif

Add avif images in HTML using nginx as a server

*爱你&永不变心* 提交于 2021-01-28 06:23:18
问题 I created some avif images with heif-anc : for i in card*.png ; do heif-enc "$i" -o "${i%.*}.avif" ; done But When I added them to my website, it just proposed to download the image instead. Then I enabled avif images in my nginx-config with http { types { image/avif avif; } ... Now it tries to display the image, but they seem to be broken. If you call it directly, Firefox with successfully enabled avif support shows this error message: avif could not be displayed because it contains errors

How to enable AVIF support for a server

蹲街弑〆低调 提交于 2021-01-24 10:48:08
问题 The AVIF image format looks to be a really promising format. How can you compile and use it on a web server? Mine specifically is Ubuntu 18.04/Nginx but I'm looking for a gist of how to compile and start converting images? 回答1: AVIF seems to be a new format, and not much info could be found. But, let's go right away into the findings, that were there: From [1] I found a cook book how to serve those on Nginx: http { # ... Omitted. map $http_accept $ai { "~avif" "a"; "~webp" "w"; default ""; }