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

Animated GIFs no longer play when sent #3570

Closed
binarydad opened this issue Nov 27, 2023 · 7 comments
Closed

Animated GIFs no longer play when sent #3570

binarydad opened this issue Nov 27, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@binarydad
Copy link

binarydad commented Nov 27, 2023

Previously, I was able to copy/paste an animated GIF and not only did it play in the text box, but also (of course) in the chat history. It also worked for attaching a GIF image. Now, while the animation plays when pasting the image or attaching an image, when sent, just a static image is sent. I can get it to work when I attach as a "File" instead of an "Image".

I imagine this is due to the new image compression happening in this new version? Can GIF images be ignored when compressing before being sent?

  • Operating System (Linux/Mac/Windows/iOS/Android): Windows
  • Delta Chat Version: 1.42.1
  • Expected behavior: GIF images that are sent play animation in the chat history/window
  • Actual behavior: Previous behavior, where pasted animated GIF images and attached "Images" are not compressed and sent as-is
  • Steps to reproduce the problem: Find an animated GIF (say, giphy.com), copy and paste into the chat text box (note that it plays once pasted), and hit send. The image is no longer animated. The same behavior is seen when attaching an "Image".
  • Screenshots: none
  • Logs: none
@Simon-Laux Simon-Laux added the bug Something isn't working label Nov 28, 2023
@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 28, 2023

Find an animated GIF (say, giphy.com), copy and paste into the chat text box (note that it plays once pasted)

how do you copy it from giphy? when I try to copy it I get the current frame as png, the image seems to be webp and also does not work in other apps like discord for me.

@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 28, 2023

downloading the webp file and dropping it into deltachat desktop works (still animated), but if I copy from firefox or from chrome I get the image only as png, log output:

 Clipboard available formats: [ 'image/png', 'text/html' ]

maybe it is somewhere inside of the html as base64, I need to check that, but other than that there is not much we can do about it, maybe it's a bug in chrome or in electron? do you know any apps where this works?

Edit: found this, looks like chrome/electron does not support webp in clipboard yet: https://superuser.com/questions/1664216/why-does-google-chrome-and-safari-copy-image-as-png-representation

Edit2:

maybe it is somewhere inside of the html as base64, I need to check that

checked it, the html file only contains a link to the gif file, so it's useless (because we don't want to do network requests from deltachat desktop).

@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 28, 2023

So impossible to fix I'd say unless we want to write native code that extracts the clipboard contents, but even then IDK if browsers even copy to clipboard correctly or already convert to png while copying?

Note that I tested to get debug info on mainly on MacOS.
I added more log statements in #3574 if someone wants to try on linux and windows, but I don't expect the situation to be better there.

@binarydad
Copy link
Author

I'll try and swing back on this tonight but I know this used to work, at least for a short while. I was able to copy GIFs (right-click, copy image) and paste into the chat box. Not only did it play in the chat box, but also in the message history once sent. It was actually really convenient.

This was on Firefox. I have not tried Chrome/Edge.

Even Win + . on Windows 11 didn't work as nicely.

@Simon-Laux
Copy link
Member

Simon-Laux commented Nov 29, 2023

I suspect the electron upgrade more than the image compression because drag and dropping and attaching the image file (as image) still works perfectly for me. (though webp is not selectable in the image attachment chooser, maybe sth. for a dedicated issue?)

There seem to be some GUI tools to debug clipboard contents: #2323
DC desktop is based on electron which is based on chrome(sum), might be the chrome does not support pasting of different image types?

@farooqkz
Copy link
Collaborator

farooqkz commented Dec 6, 2023

I just tested with two GIFs:

https://tenor.com/view/catjam-cat-music-jam-vibing-gif-20520051
https://giphy.com/gifs/starwars-oQkEpeve8GcCSh9QcH

I've pasted them in Telegram's saved messages and DC's. The results were the same. The GIF is not animated anymore. So I guess the issue is invalid?

Edit: attaching GIF as an image works

@Simon-Laux
Copy link
Member

Simon-Laux commented Dec 6, 2023

I think it's also a bug of the browsers, looks like sth we can not really solve, or only partially solve that it only works with some browsers (firefox in this case).
I'll close it and put it to project resurrection, as there is no real actionable item for us right now.

Feel free to add more info if you find out sth that could help us solve this then we can bring this issue back to life.

@farooqkz farooqkz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
@github-project-automation github-project-automation bot moved this to Closed PRs and Issues in Project Resurrection Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Closed PRs and Issues
Development

No branches or pull requests

3 participants