We are trying to integrate varnish and webp.
We already disabled caching of jpg,png and jpeg within varnish.
Our problem is that it seems webp on demand is unable to convert and provide the original file.
We have this configuration in our nginx
location ~ ^/?wp-content/..(png|jpe?g)$ {
add_header Vary Accept;
expires 365d;
Hi,
We are trying to integrate varnish and webp. We already disabled caching of jpg,png and jpeg within varnish.
Our problem is that it seems webp on demand is unable to convert and provide the original file. We have this configuration in our nginx location ~ ^/?wp-content/..(png|jpe?g)$ { add_header Vary Accept; expires 365d;
if ($http_accept !~* "webp"){ break; } try_files /wp-content/testdir/webp-images/doc-root/$uri.webp $uri.webp /wp-content/plugins/testplugin/webp/webp-on-demand.php?source=$request_filename ; }
Here is varnishlog output: