[Vuejs]-Vue-cli: how to use pictures' paths from local json as src

1👍

You can solve this by changing your json file and image element:

[
  {
    "id": 1,
    "name": "name1",
    "address": 'pic1.jpg'
  }
]

<img :src="require(`./assets/${item.address}`)" >

See more here:
https://github.com/vuejs/Discussion/issues/202

Leave a comment