location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
add_header Vary Accept;
if ($http_accept ~* "webp"){
set $imwebp A;
}
if (-f $request_filename.webp) {
set $imwebp "${imwebp}B";
}
if ($imwebp = AB) {
rewrite ^(.*) $1.webp;
}
}
because <picture> tag has not displayed images for some users...
i have changed to rewrite rule.. but now there are displayed just png files instead of webp..
Hej i have used nginx rule:
because
<picture>
tag has not displayed images for some users... i have changed to rewrite rule.. but now there are displayed just png files instead of webp..