Всем привет. Прошу помощи у знающих людей. Питаюсь сделать подмену изображения с jpg на WebP при условии если браузер поддерживает WebP. Пробовал настроить Nginx по этой статье: ссылка Но к сожалению не получается. Часть конфига Nginx Код (Text): server { listen 212.86.114.190:80; server_name kino24-7.ru www.kino24-7.ru; root /home/admin/web/kino24-7.ru/public_html; index index.php index.html index.htm; access_log /var/log/nginx/domains/kino24-7.ru.log combined; access_log /var/log/nginx/domains/kino24-7.ru.bytes bytes; error_log /var/log/nginx/domains/kino24-7.ru.error.log error; location / { location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|ico|rtf|js|css|bmp|svg)$ { log_not_found off; expires max; add_header Cache-Control public; } location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass unix:/var/run/php-kino24-7.ru.sock; fastcgi_index index.php; fastcgi_read_timeout 600; include /etc/nginx/fastcgi_params; } } error_page 403 https://kino24-7.ru/404.html; error_page 404 https://kino24-7.ru/404.html; error_page 500 502 503 504 https://kino24-7.ru/404.html; location /error/ { alias /home/admin/web/kino24-7.ru/document_errors/; } Менял для подмены так: Код (Text): server { listen 212.86.114.190:80; server_name kino24-7.ru www.kino24-7.ru; root /home/admin/web/kino24-7.ru/public_html; index index.php index.html index.htm; access_log /var/log/nginx/domains/kino24-7.ru.log combined; access_log /var/log/nginx/domains/kino24-7.ru.bytes bytes; error_log /var/log/nginx/domains/kino24-7.ru.error.log error; location / { location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|ico|rtf|js|css|bmp|svg)$ { if ($http_accept ~* "webp") { set $webp T; } proxy_cache_key $scheme$proxy_host$request_uri$webp; log_not_found off; expires max; add_header Cache-Control public; } location ~ [^/]\.php(/|$) { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; if (!-f $document_root$fastcgi_script_name) { return 404; } fastcgi_pass unix:/var/run/php-kino24-7.ru.sock; fastcgi_index index.php; fastcgi_read_timeout 600; include /etc/nginx/fastcgi_params; } } error_page 403 https://kino24-7.ru/404.html; error_page 404 https://kino24-7.ru/404.html; error_page 500 502 503 504 https://kino24-7.ru/404.html; Подскажите как подправить правильно конфиг. Спасибо.