Skip to content

Commit 59a5e8d

Browse files
authored
Add WEBP Support by default
1 parent 6a63aac commit 59a5e8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pub/media/.htaccess

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ AddType image/gif gif
5252
AddType image/png png
5353
AddType image/jpeg jpg
5454
AddType image/jpeg jpeg
55+
AddType image/webp webp
5556

5657
# SVG
5758
AddType image/svg+xml svg
@@ -75,7 +76,7 @@ AddType application/xml xml
7576

7677
<IfModule mod_headers.c>
7778

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

@@ -112,14 +113,15 @@ AddType application/xml xml
112113
ExpiresByType application/javascript "access plus 1 year"
113114

114115
# Favicon, images, flash
115-
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>
116+
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg|webp)$>
116117
ExpiresDefault "access plus 1 year"
117118
</FilesMatch>
118119
ExpiresByType image/gif "access plus 1 year"
119120
ExpiresByType image/png "access plus 1 year"
120121
ExpiresByType image/jpg "access plus 1 year"
121122
ExpiresByType image/jpeg "access plus 1 year"
122123
ExpiresByType image/svg+xml "access plus 1 year"
124+
ExpiresByType image/webp "access plus 1 year"
123125

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

0 commit comments

Comments
 (0)