Answer the question
In order to leave comments, you need to log in
Vue2 + img src: how to properly grab an image?
Greetings!
There is an image that needs to be displayed in the component:
<img class="map" v-if="form.address" src="screens/mages/map.png">
Answer the question
In order to leave comments, you need to log in
I would go here: https://cli.vuejs.org/guide/html-and-static-assets... and choose one of the options depending on your needs.
One is to put the file directly in the public folder, let's say public/screens/mages/map.png
, then the src="/screens/mages/map.png"
file should be available along the path.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question