Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveImage command saves images without a file extension #643

Open
HubertDuck opened this issue Jul 19, 2022 · 1 comment
Open

SaveImage command saves images without a file extension #643

HubertDuck opened this issue Jul 19, 2022 · 1 comment

Comments

@HubertDuck
Copy link

twitterで「画像を保存する」のジェスチャーを使うと、
ファイルに拡張子が付かない。
twitter以外のサイトでは拡張子が付きます。

@HubertDuck HubertDuck reopened this Jul 19, 2022
@Robbendebiene Robbendebiene changed the title twitterで画像の拡張子が付与されない SaveImage command saves images without a file extension Jul 19, 2022
@Robbendebiene
Copy link
Owner

Robbendebiene commented Jul 19, 2022

It is hard to decide whether this is a bug or not. The Save Image command basically saves the file as it is. Since the image does not include any file extension itself it is saved without it.

What makes it feel like a bug is that Firefox appends/generates a file extension when downloading it via right click "Save Image".

I would love to mimic this, but there is no way to determine the MIME type of the image before downloading it. It would probably be possible if this would be implemented: https://bugzilla.mozilla.org/show_bug.cgi?id=1245652
One could also argue that Firefox should do this automatically when using the web extensions downloads API without specifying a file name.


reference: https://stackoverflow.com/questions/31314035/htmlimageelement-how-to-get-image-type-if-its-src-doesnt-have-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants