I can easily add an image on any component like this:
<img src="@/images/q3.png"> but when I see the devtools the src has a different name <img src="/img/q3.91066fb2.png">. The vue/cli adds the image to a diferent folder and it adds a random number to the name. The problem is that I need to use the image inside a v-html as a text: v-html='<img src="@/images/q3.png">'(the text is inside a variable in data, this is just a simplification) but this doesn't work showing a blanck image. What can I do to access this image?
Ps: I have multiple images, I need a solution that works with all of them
Edit: I find this possible duplicate: vuejs v-html image tag not resolving src. It helps me see that the problem is the path. So I changed the images folder to be alongside the src and public folders and i changed the path to <img src="images/q3.png"> and it worked. Though I don't know if this is best practice, could not make the images folder inside the public or src folders.
Edit: As suggested I can just move the images folder into the public folder while remain with the same path images/q3.png