From a75239a3f72bd39756e0deb92e20fac62037432c Mon Sep 17 00:00:00 2001 From: filip Date: Sat, 20 Sep 2025 16:33:51 +0200 Subject: [PATCH 1/2] allowing webp extension --- roles/debian/nginx/templates/drupal10.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }}; From fe4d1c08a98f1e94bc877806a90d7519bdfc6229 Mon Sep 17 00:00:00 2001 From: filip Date: Sat, 20 Sep 2025 16:36:43 +0200 Subject: [PATCH 2/2] adding webp mime type --- roles/debian/nginx/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/debian/nginx/defaults/main.yml b/roles/debian/nginx/defaults/main.yml index 0d5568b55..e79e7fe36 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"]