Embed vault images via HTML with relative path

What I’m trying to do

I’d like to have images in my MD files, that have some css style, and most importantly have a caption. I tried many things, but ended up using HTML with <figure> and <figcaption>. But I realised, that I cannot simply link my images (that are in the vault and have a unique name) but need to specify the whole absolute path:

<figure class="img" id="name">
    <img src="C:\Users\...\...\...\Screenshot 2022-08-12 195217.png">

but i’d like to have it like this (with real spaces or %20 doesnt matter):

<figure class="img" id="name">
    <img src="Screenshot%202022-08-12%20195217.png">

like I would with markdown:

// or
![[Screenshot 2022-08-12 195217.png]]

I also had a look in the forum, eg this post, but this also didnt work:

Is there a way to embed images, that are in the vault, via HTML, only by their name or relative link in the vault?


I ran into the same problem, do you have a solution now?

nope, not yet. maybe in the upcoming v0.16 release