Embed images with HTML and relative path

Hello! I already had read the documentation, forum, discord, and I did not find a solution to my problem. Here it goes:

I need to handle more attributes of an image than just size, for example “center” the image, etc. Thus I need to use HTML tag . So far, so good. I just need a URI.

But I want to use images stored inside the vault. So far, so good, because right now I can use the file:/// to define an absolute path.

BUT, because I’m a PUBLISH OBSIDIAN user, I cannot use absolute paths. Currently, my workaround is make my images available on a public folder in my cloud, and make “https” path to access them. BUT It makes things harder to be done.

I wish I could just have all the images stored in a folder inside the vault I’m publishing.

Is it possible to have a path like, let’s say:

<img src="./../folder-with-image/image.jpg">
6 Likes

I just ran into this exact same issue. Did you ever manage to resolve it?

Same problem here. Relative links appeared in HTML after I exported some of my OneNote notes into a md files

I think the best solution is for obsidian to make it possible to handle URI’s from reference managers like zotero like they files they are. I mean it can already open the link. it just needs to somehow get the link from zotero’s api and replace it when it is parsing it. it is going to solve so many problems for me

Solution I have not found. As this is an issue only in Obsidian Publish, I proceed using the workaround I’ve described so far, that is, putting the images I intend to use in a public directory of my personal cloud (pCloud).

Has anyone found a solution to this? I feel like it should be possible to reference a file with a relative path in HTML. Typora can do it. When I started using Obsidian all my images in HTML disappeared because they are stored in the same folder as the markdown file.

Is there a reason this doesn’t work or is it a known bug?