Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OT but I just hate that firefox converts images to webp by default. The downloaded file is NOT whats at that URL. Having another format to deal with and not well supported is super annoying. I tried once to disable this in the “advanced settings” but it broke something and had to revert. Please have a simple checkbox in the standard settings page and have it disabled by default!


Some website backends have multiple image formats available. Their frontend will tell the browser to load webp preferentially with code like this. Browsers that don't support webp will just fall back to jpeg or whatever.

The html looks something like this:

  <figure>
    <picture>

      <!-- Load webp if browser supports it -->
      <source media="(max-width: 500px)"
              data-srcset="image.webp"
              type="image/webp">
   
      <!-- Load jpg if browser doesn't support webp -->
      <source media="(max-width: 500px)"
              data-srcset="image.jpg"
              type="image/jpeg">

      <!-- Fallback to this -->
      <img src="image.jpg">

    </picture>
  </figure>
I process images on upload to be available in multiple sizes and formats. I serve webp first since the (normally) smaller size makes the page faster for users.


Source? Are you absolutely certain that the webserver is not transparently converting jpeg to webp and serving it under the same url? Cause that’s how every bug report about FF saving images as webp ends up getting resolved.


It does not convert. But if you don't want WebPs, use:

https://addons.mozilla.org/en-US/firefox/addon/dont-accept-w...


In case you don't want to install an extension, search in about:config for "image.webp.enabled" and set it to false. Worth mentioning, there's also a "image.avif.enabled" entry.


That is not the same thing. This addon does not modify "image.webp.enabled" or "image.avif.enabled", it modifies the accept header. If you modify the preferences you mention you will still be served AVIF and WebP, but viewing will break...


Thankyou, friends have been complaining about this for a while so now I can help them :-)


> firefox converts images to webp by default

No it doesn't. What are you referring to?


It doesn't convert them, but when it makes an additional request to download the file, the server might (depending on MIME hell, etc.) send back a different format. This is real and annoying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: