2

When I have an image URL for a jpg or png image, for example:

https://static.coingecko.com/s/coingecko-logo-d13d6bcceddbb003f146b33c2f7e8193d72b93bb343d38e392897c3df3e78bdd.png

When I visit this link, it shows me the image. When I right click the image and 'Save Image As...' for some reason it insists on saving it as a .webp (Google WebP) image.

It's not just a matter of renaming the extension, the file it downloads and saves is actually a webp image.

No matter what I do, I cannot seem to get my browser to just save it in the native format I'm visiting, i.e. png or jpg (in this example, png).

This happens in any browser: Chrome, Firefox, Brave, Chromium, et cetera.

Note that when I do curl <theurl> from the terminal, I am getting the correct image file.

And when I build a custom script to inspect the HTTP headers, it has the correct mimetype (image/jpeg or image/png). This makes me think that apparently, full browsers (not just some curl script) send some Accept header or something, that causes the particular webserver to output a webp image instead of the png or jpg, regardless of whether the URI specifically requests the png or jpg.

I'm sure there is some rational reason for this behaviour but I don't want it. Is there a way to fix this?

RocketNuts
  • 1,342

2 Answers2

4

You would need to switch the browser's user agent setting. If the web server recognizes an older browser incapable of webp, it should give you png.

Furty
  • 771
4

This is not really a web browser thing, but a web server thing. When the browser says it can handle webp images, some (allas: many) servers send webp images, even when the url would suggest it is a jpg or png image. The browser then displays and saves what it gets: the webp image.

The easy way around this is: copy the image url (many browsers have such an item in the right click popup menu), and use a program like wget or curl to download the image:

wget http://huppeldepup.png
db-inf
  • 79