Reputation: 79
How can I use object in img src?
// html
<img src= "item.img"
Upvotes: 1
Views: 369
Reputation: 4684
Below is a way to pass the url
<img :src="item.img"
if the above doesn't work then try the same using require
just as below
<img :src="require(item.img)"
Assuming that item
is an object with img
property present in it
Upvotes: 1