Local images with links are not clickable, and have the external link icon offset when in Reading mode

Demo using Sandbox vault

Obsidian_GLVrPHcnSj

Steps to reproduce

  1. Open the Sandbox vault.

  2. Add any image to the vault. I have tested this with JPG and PNG.

  3. Create an image link in this format:

[![](local_image.png)](https://obsidian.md/)

This format is in the CommonMark spec, example 516:

https://spec.commonmark.org/0.30/#example-516

Expected result

image

Actual result

image

Environment

SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v1.1.9
Operating system: Windows 10 Pro 10.0.19045
Login status: logged in
Catalyst license: vip
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Can anyone reproduce? This is happening for me with all images in all vaults on all platforms.

Exact same behavior here. Image is not clickable and icon is pushed above.

macOS 12.16.2, v1.1.9 Sandbox

1 Like

Yes I can reproduce. When I test it, it works with an html linked image. It also works with an absolute file:///path image. But not a local vault image.

I don’t personally know if it supposed to be supported. Do you know of any example or documentation that suggests this format is supported using local vault paths? Or did it used to work for you?

2 Likes

Obsidian v0.15.9 has the same behavior for vault images.

1 Like

It’s in the CommonMark spec with a local path, v0.30 example 516:

https://spec.commonmark.org/0.30/#example-516

This is very interesting, thanks for noticing this!

I know it’s valid syntax for html. Have you seen any evidence in Obsidian documentation that a local vault path would be recognized?

An html relative filesystem path on a server and a local Vault path aren’t equivalent. They just look identical in syntax.

I agree it would be great if it worked. I’m just brainstorming why it might not be.

Example, relative images have never worked in html syntax for text links. I don’t know if that has ever changed:

I’m not exactly sure what you mean. Everything functions correctly, as in there is an image and there is also a functional link. So it’s clearly supported. It’s only the visual output which is a bit messed up.

You can’t click on the image as a link either. Only the little arrow. The fact it works at all might just be a coincidence. I’m not getting “clearly supported” vibes.

I think we’re talking about different things. Your question which I quoted was about a local vault path being recognised. My reply was to say that the local vault path is indeed being parsed and turned into an image.

In the help docs there is an image with a local path (“og-image.png”):

https://help.obsidian.md/How+to/Format+your+notes#Images

And the CommonMark spec says that this is valid Markdown to encapsulate an image with a link in this way, so going back to my first post it looks like there is a bug with the conversion to HTML elements in the reading view.

(Obsidian supports CommonMark)

Any response from the Obsidian team? This is a nice, easily replicable bug report, using the sandbox vault, with direct links to the applicable CommonMark spec.