Closed Bug 1533990 Opened 5 years ago Closed 5 years ago

Firefox 65 erratically converts some PNGs from upload.wikimedia.org to WebP; images appear discoloured and can't be downloaded

Categories

(Core :: Networking: HTTP, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1417463

People

(Reporter: jc86035, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

  • I opened the current version of https://en.wikipedia.org/wiki/Template:Bristol_and_Gloucester_Railway_Line in Firefox 65.0.1.
  • Using the Firefox colour picker, I verified that PNG thumbnails of SVG images using the same sRGB hex triplet were being rendered with different colours (e.g. #d77f7e and #cc8481).
  • I opened the source files, and downloaded and saved them using various software (Firefox 65, Tor Browser 8, Safari 12, the Internet Archive Wayback Machine's Save Page Now function, and wget).

Actual results:

  • The colours do not display uniformly. This is probably because Firefox 65 applies colour correction to PNGs but not to WebP images. This is annoying and aesthetically displeasing, because the colours appear to be slightly mismatched when they should be the same. (Yes, the diagram has images inside triply-nested tables, but MediaWiki's SVG and canvas limitations, as well as other constraints, mean that this is probably the best possible way to do it for the time being.)
  • Only certain PNG images were converted to WebP by Firefox. This appears to be erratic. I tried manually purging four affected images by reverting the source SVG files on Wikimedia Commons, but within fifteen hours the images were again being converted to WebP by Firefox, despite being rendered as PNG after the reverts. (I initially thought that this was an error because I didn't notice the different file formats in the page headers.)
  • Furthermore, for the images that were converted to WebP, only the 20px, 30px and 40px versions were converted to WebP, and the others remained PNG.
  • Firefox 65 downloaded the WebP images as WebP images with PNG file extensions. This may cause problems because most applications cannot open WebP images.
  • All methods that did not involve WebP (i.e. all except downloading directly through Firefox 65) worked as expected.

Expected results:

  • Firefox should probably have left the PNG files alone. The file sizes are almost negligible.
  • If the images should be converted to WebP, then it needs to be done consistently.
  • Firefox should not have converted the downloads to WebP. This breaks things.

Only certain PNG images were converted to WebP by Firefox.
That statement is not correct.
Firefox does not convert between image formats !
The server converted the image to webp and send the webp image to Firefox for the requested URL !

The reason why this happens only with Firefox65 is that with the added webp support the http accept header in Firefox got changed and webp got the higher priority when requesting an URL.

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8

This is a server bug if you think that it's wrong that you get a webp image for a requested image URL that ends with .png
The HTTP accept header got changed again after Firefox65 and the image priority for all formats is equal and the "bug" of the server should disappear again.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.