New issue
Advanced search Search tips

Issue 670586 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

JPG images are saved as WEBP

Reported by term...@gmail.com, Dec 2 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Example URL:
https://ak1.ostkcdn.com/images/products/13251843/Apple-13.3-inch-MacBook-Pro-Late-2016-26f43b72-d41c-4b92-8806-fd8fcd8cedf8.jpg

Steps to reproduce the problem:
1. Right-click save as and save the jpg
2. Open the saved file in a picture viewer

What is the expected behavior?
Chrome should save jpeg image not webp

What went wrong?
The content saves as webp and not jpg. Windows 7 viewer won't open the webp files. I'd expect if I download a jpeg file visible in the browser that it be the same format on my desktop.

Did this work before? N/A 

Chrome version: 55.0.2883.75  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0
 

Comment 1 by b...@chromium.org, Dec 2 2016

Status: WontFix (was: Unconfirmed)
This is working as intended.  The server uses user agent sniffing to decide if the browser supports WebP or not.  If you open said URL in Chrome, the server serves a WebP image (despite the file extension).  Chrome is just saving exactly what it got from the server, byte by byte.

To test this, try downloading the image with wget:

wget https://ak1.ostkcdn.com/images/products/13251843/Apple-13.3-inch-MacBook-Pro-Late-2016-26f43b72-d41c-4b92-8806-fd8fcd8cedf8.jpg

You will see that the response type is image/jpeg.  However, if you make wget pretend it's Chrome:

wget --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.10 Safari/537.36' https://ak1.ostkcdn.com/images/products/13251843/Apple-13.3-inch-MacBook-Pro-Late-2016-26f43b72-d41c-4b92-8806-fd8fcd8cedf8.jpg

then you get an image/webp response type, and the image takes up 19% fewer bytes.

You can always
* use an image viewer that supports WebP, instead of Windows 7 viewer;
* convert WebP to JPEG with any modern image editing utility;
* install a user agent spoofer extension to Chrome to trick servers into not serving you WebP, at the cost of larger download sizes.

Comment 2 by term...@gmail.com, Dec 2 2016

So you're telling me even though the server names a file foo.jpg it may actually really be foo.webp?

Comment 3 by term...@gmail.com, Dec 11 2016

Nevermind I re-read your comment, so the answer appears to be yes even though it says the image ends in jpg it's actually webp. I had assumed it would save it as the type of the extension.

Sign in to add a comment