Hi,
When I'm using v-bind:src for images they show up as broken because they are not put in the build folder in /static/img/, as opposed to regular src="". Why is this and how do I fix it? I can't manually add stuff to the build folder because they are overwritten on build.
So to make it clear:
this works:
<img src="pathtoimg/img.jpg">
But this do not:
<img v-for="image in images" v-bind:src="image.url">
I have the same issue trying to access data from json files, I cant put them anywhere and access the data it seems? Because it's not in the build?
where do you keep those images before build?
The problem likely is: this
src paths and copies the files from the specified path to the assets directory in the build folder.So you will have to put those images into /<your project root folder>/static/ instead of placing them somewhere in /src/assets., because /static will be copied into /dist/ as-is.
@LinusBorg I see, thanks for clearing that up for me=)
Most helpful comment
where do you keep those images before build?
The problem likely is: this
srcpaths and copies the files from the specified path to the assets directory in the build folder.So you will have to put those images into
/<your project root folder>/static/instead of placing them somewhere in/src/assets., because/staticwill be copied into/dist/as-is.