32

I'm trying to save what appears to be a JPG image from Chrome and always end up downloading a WEBP image instead.

I'm on Chrome Version 80.0.3987.163 on macOS Catalina (10.15.4) and I'm trying to download a JPG image from a website. Even though the image URL clearly has a .jpg extension, when I hit CMD+S or right click the image and select Save image as... I'm presented with the file system dialog to save it and the format dropdown is set to Google's WEBP as shown here.

My guess is that they're using a JPG extension on an image which is actually a WEBP, but it's quite misleading. Is that possible? Is there a way to download the image as a JPG?

frabonomi
  • 447
  • 1
  • 4
  • 9

8 Answers8

27

File extensions are quite irrelevant for HTTP: if the server says Content-Type: image/webp, then it's a WebP image, period. (Compare to how most websites don't use .html in their URLs anymore even though they serve HTML-based webpages.)

The original image uploaded to the website was an JPEG file; however, it is served to you through a "content delivery network" (Akamai in this case). The CDN's job is to host these files and reduce load on the website's real servers, but many CDNs provide various optimization features to save bandwidth for clients as well – this often includes re-compressing images, minifying JS/CSS files, and so on.

Akamai looks at the HTTP request's User-Agent header to guess what the best format supported by your browser would be (although, oddly, it ignores the Accept header) and automatically converts the image to WebP whenever it wants to. The URL remains the same, but the response's Content-Type header indicates the new format.

Other than installing a "User Agent spoofer" extension or trying a different browser, you could also copy the URL and use the curl or wget tools through Terminal to download it (macOS should have at least one of them built-in). The CDN will usually exempt "non-browser" tools from the webpification feature.

curl -Of https://mosaic03.ztat.net/vgs/media/catalog-lg/NI/12/2O/0H/NQ/12/NI122O0HN-Q12@9.jpg
u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
16

CDN data traffic reduction

WebP is an image format currently developed by Google, based on technology acquired with the purchase of On2 Technologies.

If the User-Agent field in your HTTP(S) request header reveals you are using a recent browser, content delivery network (CDN) servers may serve original .jpg or .png images in this new WebP format to reduce data traffic. Nonetheless, these served image files will keep their original file extension; what is truly misleading and deceiving.

On GNU/Linux systems, one solution consists in downloading the original image file using either the wget or curl command.

Several Google Chrome extensions offer a way to save images served as WebP in another image format. However, only one extension is open-source software; which is Save image as Type.

This and all other similar extensions have one annoying drawback, though. Between saves, these extensions do not recall the directory to which the previous image was saved. This may or may not be due to Google's sand-boxing policy concerning extensions. Anyhow, I opened a GitHub issue about it.

Save  image as Type

Serge Stroobandt
  • 2,055
  • 1
  • 28
  • 25
  • 1
    Does the extension download the original JPG or does it convert from WEBP to JPG? Double conversion could eventually lead to image data loss... – sɐunıɔןɐqɐp Jun 27 '22 at 10:22
  • 2
    @sɐunıɔןɐqɐp Unfortunately, the extension downloads the WEBP and converts it to JPG. Chrome will not allow you to do otherwise with the default HTML request header of the browser. However, JPG is lossy anyhow from the outset. If you want the original JPG, either change the HTML request header of the browser to something old or else grow up and use the `wget` or `curl` command on GNU/Linux. – Serge Stroobandt Jun 30 '22 at 16:14
3

I found a workaround for it, I opened IE11 which is installed by default and is ancient enough to not know what webP is.. and it saved as JPG like it should :-)

finally there is some use for this relic.

Omer Bonfil
  • 131
  • 2
  • 1
    This isn't really a workaround..... Internet explorer is slow and outdated and a pain to launch – pigeonburger Apr 05 '21 at 10:12
  • 1
    @pigeonburger True, but it gets the job done in getting the original JPG nonetheless – Omer Bonfil Apr 12 '21 at 08:11
  • 1
    @pigeonburger Why is IE a pain to launch? I just clicked on the icon in the start menu, and guess what! It opened IE. I was able to save as a .jpg. Upvoting this answer. – Reversed Engineer May 28 '22 at 17:39
  • 1
    You can also use an old version of Firefox if you don't like IE. For me this is the best solution. I have an old version of Firefox installed anyway for some old addons I need to use from time to time. So I just launch it and save the image. Thank you for this answer! – Sandra Jun 10 '22 at 09:33
  • Similarly it worked for me in Edge in the Internet Explorer compatibility mode. – Micah Lindström May 07 '23 at 01:33
2

Not sure how long this will work, but it works as of today (08/07/2021).

As @user1686 mentioned above, If the image ext. is jpg or png in the URL, but it tries to save as a Webp image then it is likely being served from a CDN - as mentioned above - for various reasons.

To circumvent this, add a '?' after the image name, and then download it as the original file type - jpg or png.

This '?' makes the CDN think the original version of the image, not the cached/optimized (eg webp version) of this image, needs to be served.

Try this - Open this image in a new tab: https://crework.axiomthemes.com/wp-content/uploads/2017/06/cursor.png

Notice, it's a .png, but if you try to save it, it saves as a .webp

rename the image URL to this: https://crework.axiomthemes.com/wp-content/uploads/2017/06/cursor.png?123

and resave it. It works!

0

Or you can simply visit the image URL using Safari, then save the image in its original format (jpg, png etc).

0

I was able to save a jpg using Google Chrome by right-click (and hold), then dragging the image onto my computer desktop, and THEN choosing the "save as" context menu. For some reason dragging the mouse cursor gave me the option to save as jpg. So rather than save as "61wpPwFUwtL._SL1500_.webp" it saved as "61wpPwFUwtL._SL1500_.jpg". Easy-peasy.

LeftyMaus
  • 153
  • 1
  • 6
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 23 '22 at 16:36
  • Tried this on latest Chrome 110.0.5481.180 and it still saves to WEBP. Only thing still working for me is to copy the URL and use CURL or a download manager (e.g. Internet Download Manager). – spaceman-spiff Mar 10 '23 at 21:34
  • Yes I regret to say this method no longer works. Unfortunately, they must have patched the browser in a more recent release so the workaround no longer is available. :-( – LeftyMaus Mar 13 '23 at 14:55
-3

First of all, your suspicions are probably correct as when I manually change the extension to .jpg, it cannot be recognized.

Secondly, if you still want to download it as a jpg file, append .jpg to the download filename, Like this:

Append .jpg

If a warning alert pops up, click "use .jpg" as pictured below. Click "use .jpg"

-4

Webp is a image format developed by Google for web graphics, you can rename the file using file.jpeg naming to open it normally, this happens because there are many extensions like jpeg, png, bmp, webp, Google saves image in webp format because it was originally webp image not jpeg I guess.

George G.
  • 182
  • 4
  • 17