3👍
Hi Try this one maybe its a webpack issue
<img :src="getSrc(plant.name)" v-bind:alt="pic">
And add to methods.
methods: {
getSrc(name) {
var images = require.context('../../assets/plants/', false, /\.jpg$/);
return images('./' + name + ".jpg")
}
}
👤Kzy
- [Vuejs]-Post request return script from live server but works on local server
- [Vuejs]-How can I add items to an input using the enter key and only submit the form when i click a button?
Source:stackexchange.com