Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WEBP + AVIF Support by default #32400

Merged
merged 29 commits into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
59a5e8d
Add WEBP Support by default
in-session Mar 9, 2021
f578f02
Add WEBP Support by default
in-session Mar 9, 2021
59161f2
Add WEBP Support by default
in-session Mar 9, 2021
81882e7
Update nginx.conf.sample
in-session Mar 9, 2021
73f6c3f
Update .htaccess
in-session Mar 9, 2021
7e4e074
Update .htaccess
in-session Mar 9, 2021
760ab36
Update nginx.conf.sample
in-session Mar 9, 2021
1e5cf5b
Update .htaccess
in-session Mar 9, 2021
c4bc0c1
Update .htaccess
in-session Mar 9, 2021
c3f7262
Update .htaccess
in-session Mar 9, 2021
28f539b
Update .htaccess
in-session Mar 9, 2021
27c93ab
Update .htaccess
in-session Mar 9, 2021
8f4e06f
Update .htaccess
in-session Mar 9, 2021
9993844
Update .htaccess
in-session Mar 9, 2021
d2bd6cf
Remove Flash
in-session Mar 9, 2021
d265e96
Remove Flash
in-session Mar 9, 2021
203dbf4
Update .htaccess
in-session Mar 9, 2021
73c94d4
Update .htaccess
in-session Mar 9, 2021
c416e6b
Remove Flash
in-session Mar 9, 2021
b877a4a
Add webmanifest for Static files
in-session Mar 9, 2021
3530c6c
SVGZ Support
in-session Mar 9, 2021
ea1f90a
Add svgz support
in-session Mar 9, 2021
9c8c61b
Update nginx.conf.sample
in-session Mar 9, 2021
8960823
Update .htaccess
in-session Mar 9, 2021
9d778c8
Update .htaccess
in-session Mar 9, 2021
8313833
Update .htaccess
in-session Mar 9, 2021
de5c558
Update .htaccess
in-session Mar 9, 2021
5188dcf
Merge branch '2.4-develop' into 2.4-develop
in-session Mar 10, 2021
22643ae
Merge branch '2.4-develop' into 2.4-develop
engcom-Foxtrot Mar 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nginx.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ location /static/ {
rewrite ^/static/version\d*/(.*)$ /static/$1 last;
}

location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|html|json)$ {
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|html|json|webmanifest)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
Expand Down Expand Up @@ -166,7 +166,7 @@ location /media/ {
deny all;
}

location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
location ~* \.(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
Expand Down
17 changes: 10 additions & 7 deletions pub/media/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ AddType image/gif gif
AddType image/png png
AddType image/jpeg jpg
AddType image/jpeg jpeg
AddType image/webp webp
AddType image/avif avif
AddType image/avif-sequence avifs

# SVG
AddType image/svg+xml svg
AddType image/svg+xml svg svgz

# Fonts
AddType application/vnd.ms-fontobject eot
Expand All @@ -63,9 +66,6 @@ AddType application/x-font-otf otf
AddType application/x-font-woff woff
AddType application/font-woff2 woff2

# Flash
AddType application/x-shockwave-flash swf

# Archives and exports
AddType application/zip gzip
AddType application/x-gzip gz gzip
Expand All @@ -75,7 +75,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|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$>
Header append Cache-Control public
</FilesMatch>

Expand Down Expand Up @@ -111,15 +111,18 @@ AddType application/xml xml
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"

# Favicon, images, flash
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>
# Favicon, images
<FilesMatch \.(ico|gif|png|jpg|jpeg|svg|svgz|webp|avif|avifs)$>
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"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/avif-sequence "access plus 1 year"

# Fonts
<FilesMatch \.(eot|ttf|otf|svg|woff|woff2)$>
Expand Down
25 changes: 19 additions & 6 deletions pub/static/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ AddType application/javascript js jsonp
AddType application/json json

# HTML

AddType text/html html

# CSS
Expand All @@ -49,9 +48,12 @@ AddType image/gif gif
AddType image/png png
AddType image/jpeg jpg
AddType image/jpeg jpeg
AddType image/webp webp
AddType image/avif avif
AddType image/avif-sequence avifs

# SVG
AddType image/svg+xml svg
AddType image/svg+xml svg svgz

# Fonts
AddType application/vnd.ms-fontobject eot
Expand All @@ -60,8 +62,8 @@ AddType application/x-font-otf otf
AddType application/x-font-woff woff
AddType application/font-woff2 woff2

# Flash
AddType application/x-shockwave-flash swf
# Manifest
AddType application/manifest+json webmanifest

# Archives and exports
AddType application/zip gzip
Expand All @@ -72,7 +74,7 @@ AddType application/xml xml

<IfModule mod_headers.c>

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

Expand Down Expand Up @@ -100,6 +102,12 @@ AddType application/xml xml
ExpiresByType application/zip "access plus 0 seconds"
ExpiresByType application/x-gzip "access plus 0 seconds"
ExpiresByType application/x-bzip2 "access plus 0 seconds"

# Manifest
<FilesMatch \.(webmanifest)$>
ExpiresDefault "access plus 0 seconds"
</FilesMatch>
ExpiresByType application/manifest+json "access plus 0 seconds"

# CSS, JavaScript, html
<FilesMatch \.(css|js|html|json)$>
Expand All @@ -111,14 +119,17 @@ AddType application/xml xml
ExpiresByType application/json "access plus 1 year"

# Favicon, images, flash
<FilesMatch \.(ico|gif|png|jpg|jpeg|swf|svg)$>
<FilesMatch \.(ico|gif|png|jpg|jpeg|svg|svgz|webp|avif|avifs)$>
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"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/avif-sequence "access plus 1 year"

# Fonts
<FilesMatch \.(eot|ttf|otf|svg|woff|woff2)$>
Expand All @@ -129,5 +140,7 @@ AddType application/xml xml
ExpiresByType application/x-font-otf "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType application/font-woff2 "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/truetype "access plus 1 year"

</IfModule>