summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-09-29 23:23:32 +0300
committerValentin Bartenev <vbart@nginx.com>2020-09-29 23:23:32 +0300
commit67d33fac66d37327ce038e1538d07f353afe87e8 (patch)
tree27a56f6c04f8bb426d9315452074fa164d3b675c
parent61eba6eef1558ed741d2bf5f1f3f5bc0481e587a (diff)
downloadunit-67d33fac66d37327ce038e1538d07f353afe87e8.tar.gz
unit-67d33fac66d37327ce038e1538d07f353afe87e8.tar.bz2
MIME: added AVIF and APNG image formats.
AVIF is a modern image format based on the AV1 video codec. It generally has better compression than other widely used formats (WebP, JPEG, PNG, and GIF) and is designed to supersede them. Support was already added to the latest version of Chrome. APNG extends PNG to permit animated images that work similarly to animated GIF. It's supported by most modern browsers. Also removed duplicated ".svg" entry.
-rw-r--r--src/nxt_http_static.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_http_static.c b/src/nxt_http_static.c
index ee18be1b..5687ef2c 100644
--- a/src/nxt_http_static.c
+++ b/src/nxt_http_static.c
@@ -470,14 +470,17 @@ nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash)
{ nxt_string("text/css"), ".css" },
{ nxt_string("image/svg+xml"), ".svg" },
- { nxt_string("image/svg+xml"), ".svg" },
{ nxt_string("image/webp"), ".webp" },
{ nxt_string("image/png"), ".png" },
+ { nxt_string("image/apng"), ".apng" },
{ nxt_string("image/jpeg"), ".jpeg" },
{ nxt_string("image/jpeg"), ".jpg" },
{ nxt_string("image/gif"), ".gif" },
{ nxt_string("image/x-icon"), ".ico" },
+ { nxt_string("image/avif"), ".avif" },
+ { nxt_string("image/avif-sequence"), ".avifs" },
+
{ nxt_string("font/woff"), ".woff" },
{ nxt_string("font/woff2"), ".woff2" },
{ nxt_string("font/otf"), ".otf" },