Hello,
I'm using WPMUDEV and Smush Pro. The following code is needed to use WebP on-the-fly.
The path of created file: <website>/conf/nginx/smush.conf
# BEGIN SMUSH-WEBP
location ~* "wp-content\/(uploads\/)(.*.(?:png|jpe?g))" {
add_header Vary Accept;
set $image_path $2;
if (-f "/var/www/ampla.tech/htdocs/wp-content/smush-webp/disable_smush_webp") {
break;
}
if ($http_accept !~* "webp") {
break;
}
try_files /wp-content/smush-webp/$image_path.webp $uri =404;
}
# END SMUSH-WEBP
After that, I have tried some ways to reload/restart NGINX:
sudo wo stack restart --nginx
sudo service nginx restart
sudo systemctl restart nginx
Doesn't work, only restart and NGINX start without erros.
The WebP won't load properly.
I have tried to chat with WPMUDEV support. The developer mode into Cloudflare was enabled and disabled. Same behaviour about WebP and code above. No erros, in fact. But won't load properly.
What I am doing wrong?