Skip to content

Commit

Permalink
Add JPEG XL image/jxl MIME type (#256)
Browse files Browse the repository at this point in the history
Co-authored-by: Léo Colombaro <git@colombaro.fr>
  • Loading branch information
mathiasbynens and LeoColomb authored Jun 24, 2021
1 parent 7abbd96 commit da3ce54
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion h5bp/cross-origin/images.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(avifs?|bmp|cur|gif|ico|jpe?g|a?png|svgz?|webp)$">
<FilesMatch "\.(avifs?|bmp|cur|gif|ico|jpe?g|jxl|a?png|svgz?|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
Expand Down
1 change: 1 addition & 0 deletions h5bp/media_types/media_types.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
AddType image/avif avif
AddType image/avif-sequence avifs
AddType image/bmp bmp
AddType image/jxl jxl
AddType image/svg+xml svg svgz
AddType image/webp webp
AddType video/mp4 f4v f4p m4v mp4
Expand Down
1 change: 1 addition & 0 deletions h5bp/web_performance/cache_expiration.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
ExpiresByType image/bmp "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jxl "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
Expand Down
2 changes: 1 addition & 1 deletion h5bp/web_performance/filename-based_cache_busting.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\w+)\.(avifs?|bmp|css|cur|gif|ico|jpe?g|m?js|a?png|svgz?|webp|webmanifest)$ $1.$3 [L]
RewriteRule ^(.+)\.(\w+)\.(avifs?|bmp|css|cur|gif|ico|jpe?g|jxl|m?js|a?png|svgz?|webp|webmanifest)$ $1.$3 [L]
</IfModule>

0 comments on commit da3ce54

Please sign in to comment.