1

I am used to simply COPY (Ctrl+C) an image file from the file manager and past it into a document (Slack, Google Docs etc), this is standard feature on Windows and macOS.

However on Ubuntu 18.04 and Nautilus (File 3.26.4) it copies a path like this: /home/petrvecera/Pictures/Wallpapers/tumblr_nfet2oaZ3P1tbxz68o1_1280.jpg instead of the file...

How to copy image file and not the path?

I know that I can use drag and drop but that is not as effective as simple copy and is pain to re-arrange windows. I have found this plugin https://www.maketecheasier.com/copy-paste-images-clipboard-nautilus/ however it just adds "feature" into the menu.

  • 3
    I think the app you paste the data to should be responsible, not Nautilus. If Nautilus would copy the image contents, what would happen when you paste into a text editor ? LibreOffice for example pastes the content, not the path. – pLumo Apr 10 at 11:03
  • @RoVo you are right it's possible that it's not an issue with the Nautilus it-self but the app needs to implement it. I was used to this on macOS mostly where it works for me almost everywhere. – pagep Apr 10 at 12:35
-1

what I do, and I know this may seem slow but it's the "get it done approach", is I open the image in www.photopea.com or a locally installed editing app such as pinta or gimp.

Pinta : pinta Install pinta

Gimp : gimp Install gimp

Hit Ctrl+A, then Ctrl+C then I have it ready to paste as an image.

the plugin you mention is of 2016 and must have broken down in ubuntu 18+. you might have to signal a bug then wait for a new verison to come out or for another plugin to come out.

Xclip could get you what you wish in the meantime in a terminal-based approach :

xclip Install xclip

xclip -selection clipboard -t image/png -i example.png

NOTE: Some research shows that you need xclip from SVN revision 81 (from April 2010) or later to have the required -t option. Or apply the patches yourself.

sources :

  • How would that be better than the plugin OP mentions? – pLumo Apr 10 at 11:00
  • as he sais it fixes the issue with precise positioning you get with drag and drop, to be able to type "Ctrl"+"V" where the cursor is. also you won't get weird conversions. you'll get the actual pixels that you can then resize to suit your needs. – tatsu Apr 10 at 11:05
  • But if you do the right click -> Copy image action it will be the same but faster – pLumo Apr 10 at 11:06
  • right click copy image with what nautilus? or gimp? in the first case you can't and in the second no it's not. keyboard is much faster. – tatsu Apr 10 at 11:08
  • 1
    Why do you think that the plugin is broken. OP even says that it just adds "feature" into the menu, so it seems working for him. But that is not what OP wants. Instead, you answer with even more complicated options ... – pLumo Apr 10 at 11:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.