New issue
Advanced search Search tips
Starred by 13 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2014
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Compat



Sign in to add a comment

Saving a Twitter image results in "jpg-large" file extension

Project Member Reported by mkte...@gmail.com, Jan 27 2013 Back to list

Issue description

Version: 25.0.1364.45 (Official Build 178221) beta-m
OS: Windows 7 64-bit

What steps will reproduce the problem?
1. View a Twitter image such as:
https://twitter.com/BarackObama/status/295586966962044928/photo/1
2. Right-click -> Save image as.  Note the default file extension in the save window.
3. Save, and check the downloaded image's file extension.

What is the expected output? What do you see instead?
I expect a .jpg file extension.  Instead it defaults to .jpg-large, which my system doesn't recognize until I remove the extra "-large".

While saving, if you type in a new filename without an extension on the end, Chrome saves it as .jpg-large.  If you type .jpg on the end, Chrome obediently saves it as .jpg.

Please use labels and text to provide additional information.
Firefox 18 and IE9 save as .jpg.  Dunno what happens with other filetypes, e.g. png.

Incidentally, Chrome on Android can't save Twitter images at all.  For some reason, long-pressing doesn't bring up the usual context menu.
 
Cc: asanka@chromium.org rdsmith@chromium.org
Labels: -Pri-2 Pri-1
Status: Available (was: NULL)
Not sure if regression. I presume the '-large' is derived from the URL: https://pbs.twimg.com/media/BBoix8aCAAAl9mK.jpg:large

Comment 2 by mkte...@gmail.com, Jan 28 2013

IIRC the bug's existed since my first Twitter visit about half a year ago, so probably not a recent regression.
Labels: -Pri-1 Pri-2
Owner: asanka@chromium.org
Status: Assigned (was: NULL)
I'll ask Asanka to take a look at this when he comes back to work in a couple weeks.
Not regression = P2.

Comment 4 by asanka@chromium.org, Feb 13 2013

Cc: -asanka@chromium.org
Yeah. The extension is derived from the URL. The filename is determined to be "BBoix8aCAAAl9mK.jpg:large", and then sanitized to "BBoix8aCAAAl9mK.jpg-large". During sanitization we replace certain characters in the filename with '-'.

In the absence of a 'Content-Disposition' header, the last component of the URL is what we have to work with. If the URL "looked like" it was a generator (i.e. had a query string), then Chrome would try to determine a better extension based on the Content-Type. But in this case that heuristic doesn't apply. Other than that we don't aggressively overwrite the extension based on the Content-Type because it has caused issues in the past (the Content-Type isn't reliable, or is too generic etc...).

In this case, however, the extension was modified during the sanitization stage. Perhaps we can use that as a signal that the extension is unreliable and overwrite it if possible.

Comment 5 by asanka@chromium.org, Feb 25 2013

We should consider reaching out to Twitter regarding adding a Content-Disposition header.

I wrote a little python http server to test that "Content-Disposition: filename=obama.jpg" would not automatically download the image, but would cause Chrome to suggest "obama.jpg" instead of "obama.jpg-large" when the user right-clicked on the image and selected Save As.
"Content-Disposition: attachment; filename=obama.jpg" would cause Chrome to automatically download the image with a Save As dialog.
Reaching out to Twitter at support.twitter.com now.

Comment 7 by asanka@chromium.org, Feb 25 2013

Thanks Ben!

The disposition type is required to be compliant with RFC 6266. So we'd need "Content-Disposition: inline; filename=foo.jpg".

Duckface at Twitter says "Thanks for your feedback, I'll share it with the team."
Project Member

Comment 9 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Type-Bug -Area-UI -Area-Compat -Feature-Downloads Type-Compat Cr-UI Cr-UI-Browser-Downloads
Cc: -rdsmith@chromium.org
Status: Archived (was: NULL)
This issue still occurs, and has been occurring for me for awhile.

Last night, for example, on this Yahoo! News article:
http://news.yahoo.com/blogs/sideshow/fogmageddon--grips-seattle-194612028.html
3 of the 4 photos were from twitter users and trigger the issue.

I'm using Google Chrome version "30.0.1599.101 m" ("Google Chrome is up to date."), on a Windows 7 Home Premium 32 bit desktop.

Comment 13 by mkte...@gmail.com, Oct 26 2013

Same here on Chrome 31.0.1650.26 (Official Build 228807) beta-m.

Comment 14 by Deleted ...@, Nov 1 2013

I want a extension of jpg:large for all my images/links that I post on Twitter, how do i convert them from original like this for example; https://pbs.twimg.com/media/BXzmrQyCEAAHHs4.jpg << This was generated from IOS source. Now I want to have it as this>> https://pbs.twimg.com/media/BXzmrQyCEAAHHs4.jpg:large How?

Comment 15 by hg3...@gmail.com, Feb 27 2014

I'd like to see this fixed. But a workaround would be when you save it, select 'all files' and add the correct extension in the 'file name' box.
Thanks for the advise!

Comment 17 by Deleted ...@, Jun 5 2014

Perhaps Chrome can just be smarter about this and know to delete the "-large" part entirely?

That seems like the simplest solution here, no?

Either that or twitter should cut it out with the stupid :large.
I'm surprised this hasn't been fixed yet. Can't Chrome just recognize the : (colon) after extension and trim from there to the end? And apparently Twitter hasn't done anything to fix it.
Another annoying aspect of this issue (on Macs) is the dialog box that pops up after you change the extension and try to save it. This makes it even more steps to try to save it correctly. A screenshot of the dialog box is attached.
Screen Shot 2014-08-04 at 5.24.47 PM.PNG
118 KB View Download

Comment 20 by mkte...@gmail.com, Aug 5 2014

Status: Assigned (was: NULL)
Setting bug status back to Assigned, since the bug still persists.  If Twitter was going to change something on their end, they didn't follow through :(
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: NULL)
asanka@

In RFC 3986, it looks like ':' is still considered to be a reserved character. 
(http://tools.ietf.org/html/rfc3986#section-2.2)

So i think Chrome should be ignoring text after ':' while generating filename from path for "BBoix8aCAAAl9mK.jpg:large"

Please share your opinion.





Comment 23 by hg3...@gmail.com, Oct 6 2014

Regardless, Chrome should recognize that's not a standard file name symbol, Windows simply converts it to something else.
#22: Thanks. That's relevant. See also section 3.3 which discusses the structure of a path http://tools.ietf.org/html/rfc3986#section-3.3 . A colon is specifically allowed in a path segment (with a few exceptions) and ...:

   Aside from dot-segments in hierarchical paths, a path segment is
   considered opaque by the generic syntax.

This section also mentions that ';' and ',' may be used by various path generators as delimiters. I suppose ':' could now fall into this bucket.

I don't believe any RFC defines how filenames should be extracted from a URL. The recommended method for specifing a filename is to use a "Content-Disposition" header rather than rely on the URL. The set of heuristics that we have in place for coming up with reasonable filenames correspond to the behavior that site authors expect from the browser. Since these are non-standard, we generally have to be careful about conflicting expectations that cause compatibility issues.

Status: WontFix (was: NULL)
Given the priority and the non-standard behavior being requested, I'm going to mark this as a WontFix.

Comment 26 by hg3...@gmail.com, Dec 30 2014

why can't you mark it as "probably an easy fix but chrome won't get off its ass and fix it"

Comment 27 by Deleted ...@, Jan 16 2015

Thanks  hg3...@gmail.com, your comment, #15, works but still this is need to be patched!
This is still an issue. Why? I do not understand why this has been going on since 2013 and nobody can resolve the issue. How pathetic.

Comment 29 by Deleted ...@, Apr 6 2015

I agree. It's odd I haven't seen anyone find a fix for this. It's a problem I only have on Chrome, which is a shame, because I'd rather use this than another internet program just to save images. If someone finds a fix / extension, that would be fantastic. 
@ redtalon...@hotmail.com :

You don't have to open another browser to save the image - just rename the extension. This is still a nuisance, to be sure, but a minor one.
what a joke that this is an issue, Chrome should just be removing -large from the filename's end if it's there after the extension

Comment 32 by Deleted ...@, May 25 2015

useless nowadays. Can't find "large" in the url and neither can I edit the large out of save as file type. Microsoft and Google, partnering to frustrate the crap out of society. Best solution? Cop image with snipping tool. Fuck the schlepp.

Comment 33 by sethn...@gmail.com, May 26 2015

It’s not that they CAN’T solve the issue, it would take 60 seconds of coding. It’s that they DON’T CARE. Why? I have no idea.
Actually, I can edit the "large" out of the filename using Irfanview. I
simply delete the word "large" after .jpg. Windows then asks me if I really
want to change the file's extension, and I click yes. After that, I can see
the thumbnail for the image and everything is fine. It is just a pain in
the a$$ to have to go through all of that just to save an image.

Comment 35 by Deleted ...@, Oct 20 2015

Wow pretty pathetic to know that Chrome and Twitter haven't done a thing about this stupid problem. It's so dumb to do this because not everyone is smart about computers, my mom would save 10 copies of the image and then ask me why they wouldn't open...
I really wish this would get fixed.  I wrote a simple batch file to recursively go through my image directories and rename the files, but after all this time this should really be fixed.
Note - this happens with .png files as well.
Its amazing Chrome still does this, I'd say this problem is quite a bit more important than Google probably realize, and a damn nuisance for the end user.

Putting my tin foil hat on, is this due to some petty Twitter/Google rivalry or something?  I hope not, just fix it already.    
Just to clear any confusion for those commenting, who don't read the thread.
It's not Chrome. It's Twitter. It's non-standard behaviour on their end which they have chosen not to change (most likely it's part of their content-serving system which allows making thumbnails and saving data). The issue is on WontFix, and has ben for over a year.
However, it's really really easy to save it without Chrome fixing this. Here's the steps:
1 - In the "Save As.." dialog, change "jpg-large" to "jpg".
That's all.

Sigh, I appreciate your "really really easy" fix, but you miss the point.  There is no way I would want to do this over and over and over again, when it could more easily be automated.  Once, sure.  Multiple times, forget it.

Comment 41 by hg3...@gmail.com, Jan 12 2016

@day

You don't have experience with this issue, or you'd know that's not how to fix it. You can't "change jpg-large to jpg" that is not an option in the dropdown.
You change it to "All Files" then add the '.jpg' extension in the File Name box.

And yes I understand 'non-standard' behavior, but if other browsers can handle it properly, why can't Chrome?
@hg3:

His method is the same as what I do to fix it all the time (as I mention in post #30, above). It's the same method I've been using for over two years (see post #12, above).

No, it's not in the dropdown, you just type in the new extension yourself as part of the filename when saving the file. He was saying to replace the text "jpg-large" with "jpg" in the "Save As" dialog's "Filename:" line-edit.

(Note: If you have filename extensions hidden on Windows, it'll hide the extension in the Save As dialog also)

Comment 43 by mkte...@gmail.com, Jan 13 2016

Looks like this extension fixes the issue:
https://chrome.google.com/webstore/detail/image-extension-fix/bdinnahhocpbhaolpffbceckdfiafffn

And nothing shady in the code.  I'll take it! :)
I just tested that extension and works great.  Thanks.  


Comment 45 by mkte...@gmail.com, Jan 25 2016

I've noticed the extension has one big drawback: When downloading an image, the save dialog will always start in your default download folder, instead of the last-used folder.  Might be a limitation of Chrome's downloads API, if I'm reading this right:
https://developer.chrome.com/extensions/downloads

"object suggestion - string filename - The DownloadItem's new target DownloadItem.filename, as a path relative to the user's default Downloads directory, possibly containing subdirectories. Absolute paths, empty paths, and paths containing back-references ".." will be ignored."

Comment 46 by mkte...@gmail.com, Jan 25 2016

Re: my previous comment, I've submitted  Issue 580926  to ask if Chrome can open the save dialog in the last-used folder even if an extension is suggesting filenames.
God bless you for sharing that extension; I was really being driven crazy by the stupid '.jpg-large' issue :)

Sign in to add a comment