Embedding existing local image creates and refers to duplicate copy of image

Every time I embed an existing image into a .md file in my vault, using the editor’s image tool, then selecting a local image on my filesystem (which in this case, is co-located with the md file at the vault root), a duplicate image appears in the root folder with " 1" appended to the filename before the suffix.

So, e.g. if I select local image file “foo.png”, it creates “foo 1.png” and inserts “” into the .md file.

What I expect to happen in this case is for the proper link to the existing file that I select to be injected into my markdown file at the cursor, and for no files to be duplicated or copied.

This is exactly what was described in this closed but not really resolved issue. The workaround someone provided there was to use Ctrl key when dragging/embedding images, but it was never stated that the copy behavior was as-designed and why. I suspect that since they referenced this doc which describes embedding external images from the web, obsidian is supposed to copy the remote files into your local vault. This behavior makes sense for remote files you want to embed, but obviously not for local files that already exist locally.

I don’t have the click + drag and drop option, as I’m experiencing this on Android. Specifically, using Android 12, Obsidian v1.2.0 (50), with the “Files and Links” → “Use Wikilinks” setting DISABLED bc I want my Obsidian-generated .md docs to be readable in other markdown renderers. (Which IMO should be the sensible default for your app, but I digress.)

So, from my vantage point, it appears that Obsidian Android app is treating local images embedded through the image tool just like they were remote files that needed to be fetched/copied locally.

I forgot to mention that I do NOT have folder sync active in my vault folder when this misbehavior occurs.

I have installed Obsidian on my windows 10 laptop, and confirmed this misbehavior is NOT present, i.e. when I drag an image file from obsidian file explorer pane and drop it into my md doc, it inserts md syntax to refer to the existing image, and does NOT create a copy.

I noticed that on the Windows install, the “Use Wikilinks” setting is off by default, unlike on Android.

I don’t understand what you are doing.
Disable themes and third party plugins and post a screen recording.

@WhiteNoise, Both are fresh stock installs of ObsidianMD with the noted versions on Android and Win10, No themes, No plugins. The issue is that Android Obsidian app is making a copy of each local image that I try to embed in a .md flle. The image and .md file are both located in the root of a vault.

I cannot edit my posts here for some reason, and I just noticed that my original post didn’t render the syntax I put to describe what is inserted by ObsidianMD in my example. In my example, ObsidianMD is not inserting "", it is inserting [](foo%201.png), so my statement should read:

So, e.g. if, on Android, I select local image file foo.png, it creates foo 1.png and inserts [](foo%201.png) into the .md file.

I understand the %20 escaping and the markdown syntax, but the issue is that it should just link to the existing image that I selected, and not create and link a copy.

This description is quite clear without a screencast.

I don’t understand it. There’s no image editor tool in obsidian.

Please post a screen recording.

I never said I was editing an image with an image editing tool. I said I was

using the editor’s image tool

The editor here is Obsidian, and I’m selecting an image using the image insertion tool in Obsidian Android app’s edit toolbar:

OK, that is for adding external images. If you want to reference something that is already in the vault you should use the first button.

Okay thanks, I see that that works. There’s 3 approaches, Embedding local, embedded external, and linking. Thx!

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