Hi Rosel, we’ve looked at our Nginx settings again haha..
This is currently what we have:
# WebP support
location ~* ^/?wp-content/.*\.(png|jpe?g)$ {
access_log off;
log_not_found off;
expires max;
add_header Vary Accept;
try_files $uri$webp_extension /wp-content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=wp-content;
}
# Pass all .php files to php-fpm, make sure the backend variable has been set in the server block that includes this snippet
location ~ [^/]\.php(/|$) {
fastcgi_pass unix:$backend;
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
include fastcgi.conf;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
proxy_read_timeout 60s;
proxy_connect_timeout 60s;
fastcgi_connect_timeout 60s;
fastcgi_read_timeout 60s;
fastcgi_param PHP_VALUE "memory_limit=768M \n
max_execution_time=60";
fastcgi_intercept_errors on;
proxy_intercept_errors on;
}
the problem is that when we use $uri =404;
behind the try files when targeting the webp-on-demand.php
file there are no new webp images being created. We are only able to let them generate when not using the $uri =404;
.
Do you have any idea what could cause this?