X
Tap here to go to the mobile version of the site.

منتدى الدعم

How to force webp images to fallback to jpg

Posted

Since Firefox is natively supporting .webp images, they are displayed as webp images on web sites providing this option. How can we force Firefox to fallback to jpg or png images? I know .webp images support is an improvement, but for my case I need to export a lot of pictures from websites using a drag'n drop from Firefox to Windows Explorer. As webp images are not supported natively by Windows, this is useless... I would like to get the standard image instead.

Remark : Before Firefox v70, it was possible to force it tweaking about:config : "image.http.accept" = "image/webp,*/*" > change to "*/*" But this tweak is not working anymore.

Since Firefox is natively supporting .webp images, they are displayed as webp images on web sites providing this option. How can we force Firefox to fallback to jpg or png images? I know .webp images support is an improvement, but for my case I need to export a lot of pictures from websites using a drag'n drop from Firefox to Windows Explorer. As webp images are not supported natively by Windows, this is useless... I would like to get the standard image instead. Remark : Before Firefox v70, it was possible to force it tweaking about:config : "image.http.accept" = "image/webp,*/*" > change to "*/*" But this tweak is not working anymore.
Quote

Additional System Details

Installed Plug-ins

None

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

More Information

jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

What if you disable webp more deeply. On some sites, images may be blank/missing if the site doesn't serve a fallback format:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

(2) In the search box above the list, type or paste webp and pause while the list is filtered

(3) Double-click the image.webp.enabled preference to switch the value from true to false

(4) Double-click the image.http.accept preference to display a dialog where you can edit the value and try the old edit, then click OK

What if you disable webp more deeply. On some sites, images may be blank/missing if the site doesn't serve a fallback format: (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter/Return. Click the button accepting the risk. (2) In the search box above the list, type or paste '''webp''' and pause while the list is filtered (3) Double-click the '''image.webp.enabled''' preference to switch the value from true to false (4) Double-click the '''image.http.accept''' preference to display a dialog where you can edit the value and try the old edit, then click OK
Was this helpful to you?
Quote

Question owner

Indeed this is the workaround I used so far... Maybe I can find a tool to convert webp to jpg... but image quality loss will be unavoidable.

Indeed this is the workaround I used so far... Maybe I can find a tool to convert webp to jpg... but image quality loss will be unavoidable.
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

What are you getting now if you disabled webp (step 3 above)?

What are you getting now if you disabled webp (step 3 above)?
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

I wonder whether an add-on could "screenshot" the WebP image and save it as JPEG as a workaround?

I wonder whether an add-on could "screenshot" the WebP image and save it as JPEG as a workaround?
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17591 solutions 159130 answers

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)?

Do you still get JPG images with an older Firefox version?

It is possible that websites do user agent sniffing and assume that current Firefox releases support WebP images.

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)? Do you still get JPG images with an older Firefox version? It is possible that websites do user agent sniffing and assume that current Firefox releases support WebP images.
Was this helpful to you? 0
Quote

Question owner

Here are 2 examples of websites: * [https://www.decathlon.fr/p/asics-lima-homme-jaune-noir/_/R-p-X8481082?mc=8481082&c=JAUNE https://www.decathlon.fr/p/asics-lima-homme-jaune-noir/_/R-p-X8481082?mc=8481082&c=JAUNE] * [https://www.leroymerlin.fr/v3/p/produits/coupe-carreaux-manuel-bosch-ptc-470-l-470-mm-e1502009853 https://www.leroymerlin.fr/v3/p/produits/coupe-carreaux-manuel-bosch-ptc-470-l-470-mm-e1502009853]
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17591 solutions 159130 answers

I think that the https://www.leroymerlin.fr website gives a JPG image when image.http.accept = */*. The first site looks rather complicated if I check the link in the Inspector. There are JPG links available, but I don't know what triggers what type to use.

I think that the https://www.leroymerlin.fr website gives a JPG image when image.http.accept = */*. The first site looks rather complicated if I check the link in the Inspector. There are JPG links available, but I don't know what triggers what type to use.
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17591 solutions 159130 answers

Helpful Reply

In the fist link I get JPG images if I disable WebP in Firefox (image.webp.enabled = false).

In both cases I get JPG images in Firefox 70 when both webp prefs are disabled.

  • image.http.accept = */*
  • image.webp.enabled = false
In the fist link I get JPG images if I disable WebP in Firefox (image.webp.enabled = false). In both cases I get JPG images in Firefox 70 when both webp prefs are disabled. *image.http.accept = */* *image.webp.enabled = false
Was this helpful to you? 1
Quote
rob41 0 solutions 5 answers

cor-el said

Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)? Do you still get JPG images with an older Firefox version? It is possible that websites do user agent sniffing and assume that current Firefox releases support WebP images.

The problem with webp is while Firefox will now display this as an image, the format is truly useless in any other context. I have yet to find a web service I use that will allow you to upload webp as an image. And if I cannot *use* an image, I don't want the thing on disk.

Moreover, conversion tools for webp to other formats, I'm finding, DO NOT WORK RELIABLY. OR AT ALL. This very much includes libwebp, which I'd dump in the compost dumpster if only I could.

Supporting webp is fine. Preventing people from working around its lack of tool support, however, is a bug, and needs to be treated as so. The current about:config settings are as useful as a hammer when applied to one's own fingers. Or head.

''cor-el [[#answer-1261845|said]]'' <blockquote> Can you post a link to a publicly accessible page (i.e. no authentication or signing on required)? Do you still get JPG images with an older Firefox version? It is possible that websites do user agent sniffing and assume that current Firefox releases support WebP images. </blockquote> The problem with webp is while Firefox will now display this as an image, the format is truly useless in any other context. I have yet to find a web service I use that will allow you to upload webp as an image. And if I cannot *use* an image, I don't want the thing on disk. Moreover, conversion tools for webp to other formats, I'm finding, DO NOT WORK RELIABLY. OR AT ALL. This very much includes libwebp, which I'd dump in the compost dumpster if only I could. Supporting webp is fine. Preventing people from working around its lack of tool support, however, is a bug, and needs to be treated as so. The current about:config settings are as useful as a hammer when applied to one's own fingers. Or head.
Was this helpful to you?
Quote
rob41 0 solutions 5 answers

syldub said

I know .webp images support is an improvement,

People keep saying that, but if, as is true both for you and for me, if a file is inert and useless on your Windows machine (no difference on a Macintosh, BTW), it's not an improvement. Just because the webp is described on Google's site as "lossless" doesn't mean the file isn't useless. At least jpg or png you get *some* pixels you can use. Webp without proper tool support is 100% lossey.

Can someone recommend a Firefox extension to work around what is now broken behavior. Could someone recommend to FF developers that they *not* treat the current implementation as anything but broken? Particularly until there are good tools to convert out of webp into formats that can be used for practical purposes.

''syldub [[#question-1271605|said]]'' <blockquote> I know .webp images support is an improvement, </blockquote> People keep saying that, but if, as is true both for you and for me, if a file is inert and useless on your Windows machine (no difference on a Macintosh, BTW), it's not an improvement. Just because the webp is described on Google's site as "lossless" doesn't mean the file isn't useless. At least jpg or png you get *some* pixels you can use. Webp without proper tool support is 100% lossey. Can someone recommend a Firefox extension to work around what is now broken behavior. Could someone recommend to FF developers that they *not* treat the current implementation as anything but broken? Particularly until there are good tools to convert out of webp into formats that can be used for practical purposes.
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

Hi rob41, website authors might be perfectly happy you find it harder to re-use their images.

That's not to say there shouldn't be an easier conversion, but some sites don't serve alternative formats, so Firefox can't just turn off WebP support without breaking some sites, although you can try that as a workaround since it could work on sites you care about. (The steps are in earlier replies.)

If you come across a useful converter in your searches, please share.

Hi rob41, website authors might be perfectly happy you find it harder to re-use their images. That's not to say there shouldn't be an easier conversion, but some sites don't serve alternative formats, so Firefox can't just turn off WebP support without breaking some sites, although you can try that as a workaround since it could work on sites you care about. (The steps are in earlier replies.) If you come across a useful converter in your searches, please share.
Was this helpful to you?
Quote
rob41 0 solutions 5 answers

While I get why some website owners would find "soft DRM" appealing, I don't think there's any need for the browser to prevent conversion of an image between formats. At least as something that an extension can modify behavior on saving of a file.

I'm fine with FF supporting that MIME type as viewable. That is useful. But right now, the format's appeal is mostly *because* it behaves like Digital Rights Management. Even *if* the webp type is, in theory, an open format.

If even GIMP will not open the damn thing, how "open" a format is that?

While I get why some website owners would find "soft DRM" appealing, I don't think there's any need for the browser to prevent conversion of an image between formats. At least as something that an extension can modify behavior on saving of a file. I'm fine with FF supporting that MIME type as viewable. That is useful. But right now, the format's appeal is mostly *because* it behaves like Digital Rights Management. Even *if* the webp type is, in theory, an open format. If even GIMP will not open the damn thing, how "open" a format is that?

Modified by rob41

Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

Helpful Reply

When this thread was active before, I researched JavaScript code to convert webp to PNG, and found the following. I am not sure it can be turned into an extension because it uses compiled (transpiled) code, but maybe someone could do it:

When this thread was active before, I researched JavaScript code to convert webp to PNG, and found the following. I am not sure it can be turned into an extension because it uses compiled (transpiled) code, but maybe someone could do it: * Demo of webp images converted to PNG (data URI's): https://chasemoskal.com/webp-hero/?force * Source code: https://github.com/chase-moskal/webp-hero
Was this helpful to you? 1
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17591 solutions 159130 answers

GIMP 2.10 should support the WebP format.

GIMP 2.10 should support the WebP format. *https://www.gimp.org/news/2018/11/08/gimp-2-10-8-released/
Was this helpful to you?
Quote
rob41 0 solutions 5 answers

rob41 said

While I get why some website owners would find "soft DRM" appealing, I don't think there's any need for the browser to prevent conversion of an image between formats. At least as something that an extension can modify behavior on saving of a file. I'm fine with FF supporting that MIME type as viewable. That is useful. But right now, the format's appeal is mostly *because* it behaves like Digital Rights Management. Even *if* the webp type is, in theory, an open format. If even GIMP will not open the damn thing, how "open" a format is that?

The latest GIMP (2.10.14) built for MacOS does appear to do the conversion. But having a working conversion too -- likely NOT based on libwebp -- would be an improvement.

''rob41 [[#answer-1265496|said]]'' <blockquote> While I get why some website owners would find "soft DRM" appealing, I don't think there's any need for the browser to prevent conversion of an image between formats. At least as something that an extension can modify behavior on saving of a file. I'm fine with FF supporting that MIME type as viewable. That is useful. But right now, the format's appeal is mostly *because* it behaves like Digital Rights Management. Even *if* the webp type is, in theory, an open format. If even GIMP will not open the damn thing, how "open" a format is that? </blockquote> The latest GIMP (2.10.14) built for MacOS does appear to do the conversion. But having a working conversion too -- likely NOT based on libwebp -- would be an improvement.
Was this helpful to you?
Quote
rob41 0 solutions 5 answers

jscher2000 said

When this thread was active before, I researched JavaScript code to convert webp to PNG, and found the following. I am not sure it can be turned into an extension because it uses compiled (transpiled) code, but maybe someone could do it:

The repo looks worth looking for. I think that under the hood, it's using the same Google libwebp source code that is failing for me locally when I installed it directly as a binary from Google, or via homebrew.

Current versions of GIMP (2.10.14 I think) seem to work better than whatever I'm installing via homebrew, which fail with cryptic errors.

''jscher2000 [[#answer-1265502|said]]'' <blockquote> When this thread was active before, I researched JavaScript code to convert webp to PNG, and found the following. I am not sure it can be turned into an extension because it uses compiled (transpiled) code, but maybe someone could do it: * Demo of webp images converted to PNG (data URI's): https://chasemoskal.com/webp-hero/?force * Source code: https://github.com/chase-moskal/webp-hero </blockquote> The repo looks worth looking for. I think that under the hood, it's using the same Google libwebp source code that is failing for me locally when I installed it directly as a binary from Google, or via homebrew. Current versions of GIMP (2.10.14 I think) seem to work better than whatever I'm installing via homebrew, which fail with cryptic errors.
Was this helpful to you?
Quote

Question owner

For my daily browsing activity, I need to see images, no matter if its WebP or standard images. But when I want to download images, I need the standard image. No easy to find a good way to configure Firefox to do so. If I configure "image.webp.enabled" = false, on some websites I may have no images displayed. For instance : https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/

It would be great to have a simple extension that could toggle the about:config "image.webp.enabled" value (false / true)... but I know this is not easy since WebExtension.

For my daily browsing activity, I need to see images, no matter if its WebP or standard images. But when I want to download images, I need the standard image. No easy to find a good way to configure Firefox to do so. If I configure "image.webp.enabled" = false, on some websites I may have no images displayed. For instance : [https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/ https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/] It would be great to have a simple extension that could toggle the about:config "image.webp.enabled" value (false / true)... but I know this is not easy since WebExtension.
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8801 solutions 71984 answers

syldub said

If I configure "image.webp.enabled" = false, on some websites I may have no images displayed. For instance : https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/

I may not be able to convert images, but I do recommend that pepper/spice grinder. They last forever. Although, they will never be that clean again. ;-)

(Not sure why the differences, but i get JPG images on that page.)

''syldub [[#answer-1266994|said]]'' <blockquote> If I configure "image.webp.enabled" = false, on some websites I may have no images displayed. For instance : [https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/ https://www.ikea.com/fr/fr/p/ikea-365-ihaerdig-moulin-a-epices-noir-10152875/] </blockquote> I may not be able to convert images, but I do recommend that pepper/spice grinder. They last forever. Although, they will never be that clean again. ;-) (Not sure why the differences, but i get JPG images on that page.)
Was this helpful to you?
Quote
cor-el
  • Top 10 Contributor
  • Moderator
17591 solutions 159130 answers

Quote: (Not sure why the differences, but i get JPG images on that page.)

Do not get confused by seeing a xxx.JPG file getting requested, you need to check this in "Tools -> Page Info -> Media" to see what type you actually have gotten from the server.

Quote: ''(Not sure why the differences, but i get JPG images on that page.)'' Do not get confused by seeing a xxx.JPG file getting requested, you need to check this in "Tools -> Page Info -> Media" to see what type you actually have gotten from the server.

Modified by cor-el

Was this helpful to you?
Quote
اطرح سؤالا

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.