"Convert to Webp" doesn't work in Waterfox Current
FaySmash opened this issue · 10 comments
In Firefox based Browsers, the "Convert to Webp" doesn't work as expected. When turned on, pictures are still delivered as PNG. In Chromium based Browsers, the same image is delivered as WebP.
Firefox/Waterfox:
<img src="/cache/z/ssl/cn/example.com/img/8278efc4940e92abfb80659bcfee914b6d0bc94e-default-320-Skizze.png" class="" loading="lazy" sizes="(min-width: 1025px) 1305px,(min-width: 769px) 1024px,(min-width: 321px) 768px,(min-width: 0) 320px" alt="" srcset="/images/logos/Skizze.png 1305w,/cache/z/ssl/cn/example.com/img/8278efc4940e92abfb80659bcfee914b6d0bc94e-default-1024-Skizze.png 1024w,/cache/z/ssl/cn/example.com/img/8278efc4940e92abfb80659bcfee914b6d0bc94e-default-768-Skizze.png 768w,/cache/z/ssl/cn/example.com/img/8278efc4940e92abfb80659bcfee914b6d0bc94e-default-320-Skizze.png 320w" width="1305" height="679">
Iron/Chrome:
<img src="/cache/z/ssl/cn/example.com/img/9b412f1cf3e33539a2763a46522d4272506e996b-default-320-8278efc4940e92abfb80659bcfee914b6d0bc94e-Skizze.webp" width="1305" height="679" class="" loading="lazy" sizes="(min-width: 1025px) 1305px,(min-width: 769px) 1024px,(min-width: 321px) 768px,(min-width: 0) 320px" alt="" srcset="/cache/z/ssl/cn/example.com/img/8278efc4940e92abfb80659bcfee914b6d0bc94e-Skizze.webp 1305w,/cache/z/ssl/cn/example.com/img/9b412f1cf3e33539a2763a46522d4272506e996b-default-1024-8278efc4940e92abfb80659bcfee914b6d0bc94e-Skizze.webp 1024w,/cache/z/ssl/cn/example.com/img/9b412f1cf3e33539a2763a46522d4272506e996b-default-768-8278efc4940e92abfb80659bcfee914b6d0bc94e-Skizze.webp 768w,/cache/z/ssl/cn/example.com/img/9b412f1cf3e33539a2763a46522d4272506e996b-default-320-8278efc4940e92abfb80659bcfee914b6d0bc94e-Skizze.webp 320w">
Alright, then I'll request Alex94 to add WebP Support to Waterfox. But could you add such important notices to the documentation please?
Okay, I will surely do that
Just checked an those are the request Header for the images in
Waterfox Classic (based on FF56)
Waterfox Current (based on FF68)
I'd understand if it wouldn't work on classic but it should work in current right? The request Header of WF Current looks exactly like yours, but I still got an PNG as response. I've no Addons installed nor tweaks done to WF Current. Could you think of another reason why it doesn't work in WF Current?
the value that triggers the webp images generation
Accept: image/webp,\*/\*
Strange that it won't work on WF Current then. Do you know a way to view the Request Header which reached the server?
press F12 to open the firefox devtools
click the network panel
click "images" filter
reload the page
click an image request, you will see the http headers on the right panel
press F12 to open the firefox devtools
click the network panel
click "images" filter
reload the page
click an image request, you will see the http headers on the right panel
That's exactly how I did the screenshots in my previous comment
I installed Firefox and it worked just fine. I can't tell why It doesn't work in WF Current tho, here are the request headers:
Firefox:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0
Accept: image/webp,*/*
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Referer: https://example.com/
Cookie: c3a8814573ccfd2635fa43830bbadf00=726adba120901b576dc392b104a13e55
Pragma: no-cache
Cache-Control: no-cache
TE: Trailers
WF Current:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: image/webp,*/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Referer: https://example.com/
Cookie: c3a8814573ccfd2635fa43830bbadf00=57e988988a1c6ed99d3778fa2a2ae57f
Pragma: no-cache
Cache-Control: no-cache
TE: Trailers
The only difference I see is the language (WF Current is in English/Firefox is in German) and that WF Current sets DoNotTrack to 1.
Well, this is the line that checks that webp is supported
https://github.com/tbela99/gzip/blob/master/helper.php#L37
So it seems strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')
returns false
. Strange, I'll look into it when I've got the time, it's not that much of a priority.