3๐
v-html
will render value as HTML without any change in the browser.
So you canโt pass vue or javascript code (:src="@/assets/image.png"
) to this.
From the documentation:
the contents are inserted as plain HTML - they will not be compiled as Vue templates
๐คQuoc-Anh Nguyen
0๐
<img src="@/assets/image.png" alt="image description">
This is correct, if the image is not loading then you have not put it in the correct directory.
@/assets
are loaded from src/assets
and the compiler optimizes and builds them out to public
dir.
It is an alias:
@
= src
๐คMarc
Source:stackexchange.com