diff --git a/roles/debian/nginx/defaults/main.yml b/roles/debian/nginx/defaults/main.yml index 33227b07a..86144f452 100644 --- a/roles/debian/nginx/defaults/main.yml +++ b/roles/debian/nginx/defaults/main.yml @@ -41,6 +41,7 @@ nginx: text/xml: ["xml", "rss"] image/gif: ["gif"] image/jpeg: ["jpeg", "jpg"] + image/webp: ["webp"] application/x-javascript: ["js"] application/atom+xml: ["atom"] text/mathml: ["mml"] diff --git a/roles/debian/nginx/templates/drupal10.j2 b/roles/debian/nginx/templates/drupal10.j2 index e02ff44ee..f02519c3d 100644 --- a/roles/debian/nginx/templates/drupal10.j2 +++ b/roles/debian/nginx/templates/drupal10.j2 @@ -124,7 +124,7 @@ location ~ ^/sites/.*/files/.* { # This Nginx config is DENY FIRST, so only these file extensions are permitted. # Core and contrib assets can be pretty much anywhere. -location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|eot|woff2|ttf|otf|webm)$ { +location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|eot|woff2|ttf|otf|webm|webp)$ { try_files $uri @rewrite =404; {% if nginx.http.cache_behavior_public %} {{ nginx.http.cache_behavior_public }};