Skip to content

Commit 4ca46af

Browse files
authored
Add mime-type image/avif and image/avifs (#251)
1 parent f4c3ede commit 4ca46af

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

h5bp/cross-origin/images.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<IfModule mod_setenvif.c>
1111
<IfModule mod_headers.c>
12-
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|a?png|svgz?|webp)$">
12+
<FilesMatch "\.(avifs?|bmp|cur|gif|ico|jpe?g|a?png|svgz?|webp)$">
1313
SetEnvIf Origin ":" IS_CORS
1414
Header set Access-Control-Allow-Origin "*" env=IS_CORS
1515
</FilesMatch>

h5bp/media_types/media_types.conf

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
AddType audio/mp4 f4a f4b m4a
4141
AddType audio/ogg oga ogg opus
42+
AddType image/avif avif
43+
AddType image/avif-sequence avifs
4244
AddType image/bmp bmp
4345
AddType image/svg+xml svg svgz
4446
AddType image/webp webp

h5bp/web_performance/cache_expiration.conf

+2
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969

7070
ExpiresByType audio/ogg "access plus 1 month"
7171
ExpiresByType image/apng "access plus 1 month"
72+
ExpiresByType image/avif "access plus 1 month"
73+
ExpiresByType image/avif-sequence "access plus 1 month"
7274
ExpiresByType image/bmp "access plus 1 month"
7375
ExpiresByType image/gif "access plus 1 month"
7476
ExpiresByType image/jpeg "access plus 1 month"

h5bp/web_performance/filename-based_cache_busting.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
<IfModule mod_rewrite.c>
1313
RewriteEngine On
1414
RewriteCond %{REQUEST_FILENAME} !-f
15-
RewriteRule ^(.+)\.(\w+)\.(bmp|css|cur|gif|ico|jpe?g|m?js|a?png|svgz?|webp|webmanifest)$ $1.$3 [L]
15+
RewriteRule ^(.+)\.(\w+)\.(avifs?|bmp|css|cur|gif|ico|jpe?g|m?js|a?png|svgz?|webp|webmanifest)$ $1.$3 [L]
1616
</IfModule>

0 commit comments

Comments
 (0)