question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default filename for 'save image as' is always image.png

See original GitHub issue

Steps to reproduce

  1. post a link to a gif such as https://media3.giphy.com/media/3o85xIO33l7RlmLR4I/giphy.gif?cid=790b7611b5238203d4dfc621261917cf4acab0e609612f97&rid=giphy.gif&ct=g
  2. wait for image preview
  3. click on image to view gif in lightbox
  4. right click and save

Outcome

What did you expect?

defaults to something.gif

What happened instead?

defaults to image.png

Operating system

arch

Application version

Element Nightly version: 2022020101 Olm version: 3.2.8

How did you install the app?

aur/element-desktop-nightly-bin

Homeserver

synapse 1.51

Will you send logs?

No

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbkrcommented, Feb 1, 2022

Aha, so this is actually completely specific to the desktop app and is because we prompt for the filename before fetching the file (apart from obviously that the browser would already have fetched it to display it). In fact it just literally defaults to ‘image.png’.

0reactions
HarHarLinkscommented, Feb 1, 2022

Choosing “copy link address” instead of “save image” yields this URL: https://matrix.example.org/_matrix/media/r0/download/example.org/2022-02-01_iBnlzJewWOBknlCt without .gif 🤔 When I download it with E anyway it is a proper gif… apart from the filename.

$ file /tmp/image.png
/tmp/image.png: GIF image data, version 89a, 350 x 263

Opening the same URL in my chromium-based browser and downloading it there does suggest the file name incl .gif ending as you said.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I set the default 'save image as' name ... - Stack Overflow
The most bullet-proof solution is to forge the URL and make the browser believe it's downloading a static file like /images/5/foo.png while the ......
Read more >
Attribute to suggest filename for image elements (<img ...
If users try to save this image in a few natural ways they get a poor suggested filename: Drag and drop image to...
Read more >
How can I change the default file type for saving images
When I set image file name to "automatic" with file extension ".png", the images are still saved as .snag files. I. 1.
Read more >
Image file formats - Pillow (PIL Fork) 9.3.0 documentation
By default, the image data will be saved in PNG format. With a bitmap format of “bmp”, image data will be saved in...
Read more >
imagejpeg - Manual - PHP
The default ( -1 ) uses the default IJG quality value (about 75). ... imagepng() - Output a PNG image to either the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found