• when testing in firefox, webp is being served, although unsupported. which leads to no images being shown? how can i fix this please?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rosell.dk

    (@roselldk)

    The problem is that you are on Cloudflare. There is a FAQ item about that. You should use the “Only convert” method. As stated in the FAQ, that mode currently needs Cache Enabler, ShortPixel or some other plugin for altering the HTML. In the next release, it will not be neccessary, as I have implemented HTML altering in WebP Express – it just needs a bit more testing, and I expect it to be released in a couple of days

    Hello, I’ve choose to update this topic regarding images not served on unsupported browsers.
    As per Your plugin instruction I’ve set cdn mode with the option “Alter Html – Replace image URLs – Only do the replacements in webp enabled browsers”, and followed the tool-tip instruction suggesting using webpjs.js(current webpjs-0.0.2.min.js) as compatibility handler for older browsers. But adding script in header and pointing both files(.js .swf) to root directory hasn’t made images replacing(.jpg) in IE 11 nor FireFox Portable, could suggest any solution?
    Thank you

    Plugin Author rosell.dk

    (@roselldk)

    I’m going to delete that tooltip and change the FAQ. Disappointingly, webpjs does not work with srcset. Now-a-days this is a show-stopper. If we are in luck, webpjs will be updated. Perhaps I will try to create it myself, if the author doesn’t. But that is going to be a lot of work, and it is not going to be in the near future

    Plugin Author rosell.dk

    (@roselldk)

    ewww adds some javascript. I haven’t looked into it. But perhaps they have a solution which we can use.

    Perhaps it is redirecting image.jpg.webp to image.jpg on browsers that doesn’t support webp. Perhaps it supports srcset. And if so, it might be possible to use that code for creating a bridge to webpjs

    Hello again,

    I came across snippet from Adaptive images plugin that I’ve used to deploy previously.

    if(strpos($_SERVER["HTTP_ACCEPT"], "image/webp") !== false){
      $tmp = preg_replace("/\.(jpe?g|png)$/", ".webp", $filename);
      if(file_exists($tmp)){
        $filename = $tmp;
        $extension = 'webp';
      }
      if(in_array($extension, array('png', 'gif', 'jpeg', 'webp'))){
      ...
    }

    As in php manual ‘HTTP_ACCEPT’ checks the Contents of the Accept: header from the current request, if there is one. so could this be used and what would you suggest?

    Regards

    Plugin Author rosell.dk

    (@roselldk)

    ah, but I already have such a test in WebP Express: When “Alter HTML” is choosen, and “Replace image URLs” is chosen, an option appears, which says “Only do the replacements in webp enabled browsers”. If that option is enabled, $_SERVER[“HTTP_ACCEPT”] is inspected to see if it contains “image/webp”:

    The HTTP_ACCEPT header is also examined in the rewrite rules for varied image responses.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘webp is being served on unsupported browsers’ is closed to new replies.