From 154784387abd7236d57ce6a39293a85d0d06fb12 Mon Sep 17 00:00:00 2001 From: Kolsch Systems Date: Mon, 16 Aug 2021 13:28:51 -0700 Subject: [PATCH] Check if web browser supports WebP images --- global/http.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/global/http.conf b/global/http.conf index faf1e6d..fc7d426 100644 --- a/global/http.conf +++ b/global/http.conf @@ -5,4 +5,10 @@ sendfile on; tcp_nopush on; # Don't wait to send data in keep-alive state. -tcp_nodelay on; \ No newline at end of file +tcp_nodelay on; + +# Check if web browser supports WebP images +map $http_accept $webp_suffix { + default ""; + "~*webp" ".webp"; +} \ No newline at end of file