Handling of image copy/paste inconsistent across common MacOS web browsers

Great tool! Giving it a try to see if it will work for my workflows. One hiccup so far is with coping and pasting images from Safari to Obsidian.

This is a more specific set of edge cases of the bug described in: Image copy paste from browser adds link instead of attaching the image

Steps to reproduce

OS: MacOS

Using each of the common MaccOS web browsers (Safari, FireFox and Edge):

  1. Open a web page containing an image (https://upload.wikimedia.org/wikipedia/commons/8/89/PNG-Gradient.png used as a test image)
  2. Right-click on the image and select “Copy Image”
  3. Go to Obisidan (Tested with v0.13.23, non-legacy editor, with live preview turned off)
  4. Paste either using CMD-V or CMD-SHIFT-V

Expected result

CMD-V: Image is taken from the clipboard “public.tiff” data, creating a new image in the vault, with an obsidian-assinged URL.

CMD-SHIFT-V: Image URL is taken from the clipboard “public.html” data, creating a new link to the image.

Actual result

All three browsers’ clipboard data is handled differently. Obsidian’s handling of Firefox’s data is the close to the expected result, with the exception that CMD-V and CMD-SHIFT-V behaviours are reversed.

See below images:

Environment

  • Operating system: MacOS 10.15.7
  • Obsidian version: v0.13.23

SYSTEM INFO:
Obsidian version: v0.13.23
Installer version: v0.13.23
Operating system: Darwin Kernel Version 19.6.0: Tue Aug 24 20:28:00 PDT 2021; root:xnu-6153.141.40~1/RELEASE_X86_64 19.6.0
Login status: not logged in
Insider build toggle: off
Live preview: off
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Safe mode: on

RECOMMENDATIONS:
none


Additional information

Related issues:

Contents of the MacOS Clipboard viewed using: GitHub - sindresorhus/Pasteboard-Viewer: 📋 Inspect the system pasteboards on macOS

what happens with chrome?

can you test newer version of osx?

Sure! I have a newer version of the OS on another computer, and I can give Chrome a try as well. Give me a little bit to get everything set up.

Tested on MacOS 12.0.1:

Looks like Chrome behaves the same as Edge.

Safari and Firefox now add a “File:” before the image name. There still seems to be no way from Safari to paste an image such that it is saved to the vault.

chrome 57?

Anyway, thanks for your tests.

1 Like

Yes, Chrome 57.

Isn’t the last version Of chrome around 98?

I’m on Macos 11.6.4. and using firefox 98.0.1 and can confirm that copy and paste of images is a mess.

Throughout the later versions of obsidian 13, and now onto 14, ⌘⇧V does nothing when it used to copy the image, and ⌘V just pastes the link (the opposite of the chromium - chrome/edge - behaviour)

IMO it doesn’t matter which way around it goes, I just don’t want to have to download the image or open another browser just to copy and paste an image into my notes.

This will be fixed in 0.14.3. Not all browser behave the same because not all browser put the same stuff on the clipboard.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.