wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
70 stars 25 forks source link

Wordpress / nginx - png instead of webp #498

Open AdamiPL opened 4 years ago

AdamiPL commented 4 years ago

Hej i have used nginx rule:

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..

piotrbak commented 2 years ago

Hello @AdamiPL we use GitHub to manage confirmed bugs. Were you able to reach our support to confirm that it's, indeed, a bug?