I'm trying to copy a gif into my clipboard such that I would be able to paste it into web applications (slack, github, etc.).

I have tried the following without any luck:

xclip -selection clipboard -t image/gif < /path/to/image.gif
  • 1
    How do you test there's no luck? – Tagwint Jul 31 '18 at 17:00
  • 1
    You roll a d20 before running the command. If the result is a 18 or more, you have luck. – charlespwd Jul 31 '18 at 20:26
  • I came across this problem recently while writing a script. The closest I have come to a solution is copying the path to the file, which really isn't much of a solution at all. At least it lets me conveniently paste the path into the file upload dialog... Also, I noticed that when I copy a GIF from Chrome using the rclick context menu, the image gets converted to a PNG. Doesn't look promising. – Joe Apr 13 '19 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.