Image copy paste from browser adds link instead of attaching the image

Image paste behavior variance depending on source of copied image

Steps to reproduce

OS: MacOS
Use case 1, step 1: Copy image data from a webpage (right click on an image, choose “copy”).
Use case 2, step 1: Copy image data from a local MacOS application (right click on an image, choose “copy”).

Step 2 (common to both use cases): Paste the image in Obsidian.

In use case 1, cmd-v pastes a MD link to the URL of the copied graphic and shift-cmd-v pastes only the URL (no MD formatting).

in use case 2, both cmd-v and shift-cmd-v create a new local file with the image contents from the clipboard and then create a wikilink to it.

Expected result

I expect to see Use Case 2 results in BOTH circumstances; the image data IS in the clipboard in Use Case 1, but Obsidian ignores it.

Actual result

Different behavior depending on how the image data was acquired / put into the clipboard.

Environment

  • Operating system: MacOS 11.1
  • Obsidian version: v0.10.13

Additional information

If I “copy” an image from a web browser, and paste it into a typical application that supports images (Word, Pages, gimp, etc.), I get the image data.

If I paste into Obsidian, I get a URL.

Looking at the actual clipboard data, the clipboard contains a .tiff version of the copied .jpg file as well as .rtf data with the original .jpg file embedded.

However, Obsidian ignores all of this and just pastes in the clipboard contents of type ‘public.utf8-plain-text’.

It is different if the image is copied from a local app (it doesn’t have a URL associated with it); in that case, Obsidian creates an attachment image file from the image data on the clipboard, and then creates a local wikilink reference to the new attachment file.

This inconsistency in Obsidian’s behavior is arguably a bug.

4 Likes

I’ve filed this as a bug report because in both cases the clipboard contains the actual image data, and Obsidian only pastes the image data in one of the two cases. All other MacOS applications I can test that support graphics have identical behavior in both cases.

2 Likes

The same situation in Linux (Pop!_OS based on Ubuntu) but even worse.
Obsidian 0.11.3
Images as in your case are inserted from wed pages as URLs.
Images from local folder are not inserted, only link to image path is inserted this way:

x-special/nautilus-clipboard
copy
file:///home/bestann/Downloads/ts-01-001.png

The image is not copied to my attachments folder inside vault.

Not sure if it’s a bug. but if directly copy paste image file that more convince, otherwise, we have to use another screenshot app, and more steps.

1 Like

I agree. This is such a discomfort. Do you know if its fixed now?

I am having the same problem, it used to be to attach the file / image that was drag and dropped rather than copying the url. what it is the use of the attachment folder? Am I doing something wrong?

I’m pretty sure I will help some people here : I had the same problem.
But!
If you past image with CTRL/CMF+SHIFT+V, it’s the real file who paste in your note, as it should be.

I’m pretty sure it’s a problem with the html autoformat.

2 Likes