Closed Bug 1598216 Opened 1 year ago Closed 1 year ago

Saving images in Firefox sometimes produces ".jpg-large" files which are difficult to work with


(Firefox :: File Handling, defect, P3)




Firefox 76
Tracking Status
firefox76 --- fixed


(Reporter: djvj, Assigned: mak)


(Blocks 1 open bug, Regressed 1 open bug)



(1 file)

This is a copy-paste of a reddit comment I read on a thread about Firefox.

The only issue I have with Firefox is every time I try to save a picture it saves it as a JPG Large for whatever reason and those don't send well over Messengers or Discord. It's annoying enough that I use lightshot to screencap pictures instead of trying to save them.

This seems to be an issue with saving image files from websites (e.g. twitter) that use the URL convention "https://.../foo.jpg:large" (or :orig, etc.) to indicate variant encodings of the same source image.

Follow-up comment on the same thread:

Well I used chrome for years and never had an issue we're trying to save the picture. You know, right click save etc. It just worked. And to the best of my knowledge from what I remember playing around on edge it does the same. For whatever reason it's just Firefox that seems to have that issue for me. I don't know what causes it, and I hate that normal jpg isn't an option whenever I click to save a picture for whatever reason. It's not a deal-breaker because I still use Firefox as my main browser now, it's just super annoying having to use a program on the side for something that I've never had an issue with before.

I can't reproduce, unfortunately. More detailed steps would really help - even a twitter link where this happens? I tried to find the reddit page based on the quotes but was unsuccessful.

Flags: needinfo?(kvijayan)

Hm, looks like some google chrome (...) support link has with the same issue reported.

When saving that link using right click + save link as, I can reproduce, but if I actually open the link and then use cmd+s, macOS suffixes '.jpg' based on the filetype. Still not entirely sure why it's not working...

Flags: needinfo?(kvijayan) → needinfo?(gijskruitbosch+bugs)

So the issue is that gets a suggested file name out of the URL which includes jpg:large. We then get the primary extension in as the suggested extension, but do not replace the extension for the filename . Some options:

  1. replace the extension if it contains illegal characters
  2. replace the extension if a mime info for the content type does not include the extension in question (on Windows we can also check in the registry if we know the extension). We should be cautious about always overwriting .jpeg with .jpg for instance.
  3. replace the extension if it mismatches iff the extension/filename didn't come from a content-disposition header (ie was parsed out of the URL).

Marco said he was interested in looking at this. :-)

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(mak)
Priority: -- → P3
Assignee: nobody → mak
Flags: needinfo?(mak)
Pushed by
Change file extensions with invalid characters to valid file extensions on save. r=Gijs
Blocks: 1621216
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
Regressions: 1637973
Regressions: 1642442
Regressions: 1651800
You need to log in before you can comment on or make changes to this bug.