Firefox actually silently and automatically converts images to webp in some cases when you Save As them, with no option to revert to the format you see in the DOM. It’s fucking infuriating. I hate webp because the support is so spotty.
I highly doubt that is what's happening. More likely the server is serving a webp under a .png filename or something.
I have observed the behavior you suspect many times.
I don't think that's firefox doing it? I'd guess it's some CDNs doing the conversion. Or the URL says .jpg but when you look at the mimetype sent by the server it's actually webp. Extentions are meaningless for browsers.
It's not Firefox, it's the server. Edit and resend the request with header "Accept: image/jpeg" only and you'll most likely get a JPEG file.
Does it actually request the image that it already downloaded again to save it to a file? Seems rather silly?
No, the server is just sending the file named 'foo.jpg', but encoded as a webp with webp mime type, so when you save the file it defaults to the webp extension cause it ends up treating the filename as a blob of text without an expected extension for the file type.
No, this is not what’s happening. Or at least not the phenomenon I am discussing.
That seems more likely. I still hate webp.
This would cause the downloaded file to have incorrect file extension because such services don't configure the Content-Disposition header properly, and you still may have lots of improperly named files unless you realize that the file content doesn't match its extension.
Annoyingly, this doesn't work for a whole lot of websites that insist on serving webp, they just ignore the header. Some of them have bespoke workarounds like adding ?format=original on fandom wikis, with some the server will just never serve you anything other than webp.