Skip to content

A platform for community discussion. Free, open, simple.

DEV: Allow webp images to be served directly by nginx (#30050)

Alan Guo Xiang Tanc70816611ffb
diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf
index 287c91a6bce..dddec2374d7 100644
--- a/config/nginx.sample.conf
+++ b/config/nginx.sample.conf
@@ -196,7 +196,7 @@ server {
try_files $uri =404;
}
# this allows us to bypass rails
- location ~* \.(gif|png|jpg|jpeg|bmp|tif|tiff|ico||avif)$ {
+ location ~* \.(gif|png|jpg|jpeg|bmp|tif|tiff|ico|webp|avif)$ {
add_header Access-Control-Allow-Origin *;
try_files $uri =404;
}