obsidian-image-layouts icon indicating copy to clipboard operation
obsidian-image-layouts copied to clipboard

External images on the computer

Open Tanjamuse opened this issue 11 months ago • 1 comments

I would love for this to work with external images on my computer, because as it is right now, all I get is a blank square, like this.

gallery

Tanjamuse avatar Mar 18 '24 18:03 Tanjamuse

I can confirm this is an issue on Mac running a newer version of macOS.

The issue appears to be because of the way Mac handles applications accessing the filesystem.


Technical Notes:

  1. If you import an image like so (without the plugin) ![](file:///some/demo/directory/file.jpg)
  2. You will get a prompt to allow access to the file system
  3. If you accept the prompt, the image will display.
  4. By inspecting the page source (and the displayed image in particular), you will notice that the URL that is being loaded looks something like app://fd37bba83bcabf5e461d9e0fb/some/demo/directory/file.jpg
  5. Putting this URL inside the plugin snippet works just fine (I suspect this URL is scoped in permissions for the app to access).

draganmarjanovic avatar Apr 30 '24 09:04 draganmarjanovic