5

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.

pomsky
  • 70,797
pagep
  • 150
  • 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 '19 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 '19 at 12:35
  • No solution with Nautilus, but opening an image with the default Image Viewer aka Eye of Gnome > Ctrl+C copies the image content. Ironically, I wanted to do exactly the opposite, copy the filepath / show image in folder from the Image Viewer (which you can do with hamburger menu > Show Presenter or Show > Image Gallery then right-click on thumbnail, but that's another story).

    Remember that doing so will, as usual, copy and paste a png in most target applications, which will often generate bigger files than the original jpg (now I force myself to always Save as... Steam screenshots).

    – hsandt May 10 '25 at 20:37

2 Answers2

0

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 :

tatsu
  • 3,357
  • How would that be better than the plugin OP mentions? – pLumo Apr 10 '19 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 '19 at 11:05
  • But if you do the right click -> Copy image action it will be the same but faster – pLumo Apr 10 '19 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 '19 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 '19 at 11:28
  • well I followed the link and the screenshots clearly show that that plugin was meant to add a "copy paste images" menu option. that he does not have this menu option or it's sub-options is indicative of a fault in the pugin's expected behavior. https://www.maketecheasier.com/copy-paste-images-clipboard-nautilus/ – tatsu Apr 10 '19 at 11:32
  • 1
    Thanks @tatsu for your help. But I was looking for a solution which would be super fast and boost my productivity. – pagep Apr 10 '19 at 12:36
  • I know I'm looking for the same so I'd like to be notified as well. For the record I tried the plugin as well. I get no new menus at all. I really think it's impossible for a plugin devellopped for the Unity desktop and for xorg to work out of the box on gnome-ubuntu-desktop and on Wayland. I really think our best bet here is for someone to make a new plugin from scratch. – tatsu Apr 10 '19 at 13:56
  • It's 2023 and I can't believe there is still no solution for this! The plugin mentioned would do the job if it were being maintained, but alas, it's not... – AsGoodAsItGets Jul 14 '23 at 07:57
0

It's 2023, the plugin that would be the ideal solution doesn't seem to work (https://github.com/atareao/nautilus-copypaste-images/issues/2) on Ubuntu 22.04.2 LTS, I cannot even install it from the repo.

The fastest/easiest solution that I have found, is to drag the image from Nautilus to Firefox (or any other browser I guess would work) and just right-click and copy from there.

UPDATE The XnView MP image viewer does this. When you enter viewer mode (not thumbnails) you right-click and select "Copy" it copies the image.

AsGoodAsItGets
  • 220
  • 1
  • 8