Hello
I know that Wo nginx config is supposed to support webp out of the box. But i have some difficulty to see it working on the wp site hosted on my server.
I have installed graphicsmagick and convert my images from pngto webp format like this
gm convert /var/www/exemple.com/htdocs/wp-content/uploads/2020/10/my-img.png /var/www/exemple.com/htdocs/wp-content/uploads/2020/10/my-img.webp
i have checked that my webp image exists in the target folder. It is half size.
I have loaded my site checked my network tab in the chrome console. The type column is still telling me that my image is png.
I have then tried to add a custom nginx config in the sites directory
/var/www/exemple.com/conf/nginx/mycustomconfig.conf
I have inserted the following lines in it :
location ~* ^/wp-content/.+\.(png|jpg)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
}
file and restarted nginx
Nothing different.
UPDATE
I am using cloudflare free as cdn and found this
https://community.cloudflare.com/t/cloudflare-cdn-cache-to-support-http-vary-header/160802/13
Maybe this is why i am facing the issue