<img> tag with relative file path

Please can we have relative file paths working for img tag?

Examples:

<img src="images/Blackbird%20drawing.jpg" style="width:40%;float:left"/>
 or
<div style="width:40%;float:left">
<img src="images/Blackbird%20drawing.jpg" />
</div>

The second example when I use IAwriter or Typora or 1writer on my MD file is rendered correctly (the picture is on the left with the text wrapped round it). For Obsidian you just get a ‘square’ indicating a picture in the text. I sync my vault with my phone and 1 writer works with the images subdirectory.
Obsidian document:

Obsidian preview:

Typora:

IAWriter:

Img tag works with http links but I do not want to use http links to pictures on the web as I am often in places with no internet access.

Use case or problem

For my vault I have a subdirectory of images. Standard markdown works but if I try and wrap this in html div or use img tag with relative path it fails.

The formats in the examples above work in all my markdown editors pointed at my vault.

Proposed solution

Allow relative path in image tag

Current workaround (optional)

I have searched obsidian forum and cannot find a work around

Related feature requests (optional)

None

12 Likes

I’ve got the same problem, do you know the solution?

Same problem, any news?

Same problem… I want to use simonhaenisch/md-to-pdf to render some of my vault as PDF, but it doesn’t support wikilink format images:

![[foo.png]]

so I have to use either

![](attach/foo.png) which does not support resizing

or plain ol’ <img width=200 src="attach/foo.png">
which works everywhere except inside Obsidian… :man_shrugging:

Same here. Any update? I think this is a higher priority, because currently in terms of compatibility, Typora is much better because of this feature

Looking for an update here as well. This would be great as a feature for publishing.