Skip to content

Commit

Permalink
Add WEBP Support by default
Browse files Browse the repository at this point in the history
  • Loading branch information
in-session authored Mar 9, 2021
1 parent 6a63aac commit 59a5e8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pub/media/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ AddType image/gif gif
AddType image/png png
AddType image/jpeg jpg
AddType image/jpeg jpeg
AddType image/webp webp

# SVG
AddType image/svg+xml svg
Expand All @@ -75,7 +76,7 @@ AddType application/xml xml

<IfModule mod_headers.c>

<FilesMatch .*\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$>
<FilesMatch .*\.(ico|jpg|jpeg|png|gif|svg|webp|js|css|swf|eot|ttf|otf|woff|woff2)$>
Header append Cache-Control public
</FilesMatch>

Expand Down Expand Up @@ -112,14 +113,15 @@ AddType application/xml xml
ExpiresByType application/javascript "access plus 1 year"

# Favicon, images, flash
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg|webp)$>
ExpiresDefault "access plus 1 year"
</FilesMatch>
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"

# Fonts
<FilesMatch \.(eot|ttf|otf|svg|woff|woff2)$>
Expand Down

0 comments on commit 59a5e8d

Please sign in to comment.