How do I copy files (e.g. pictures) to clipboard using bash so that I can paste them into other programs?
If I view an image in Firefox and right click and copy the image, then I can directly paste it into other program like for example telegram using Ctrl+V to send the image. I would like to have that functionality that I could do that from bash too.
I tried using
cat image.png | xclip -selection c
when I then press Ctrl+V in telegram, it pastes
as text instead of pasting the image.
xclip-copyfile does not work either, it does not change the content of the clipboard that is used when pressing Ctrl+V in telegram at all.