Linking to images referenced in vuex store in Vue.js Linking to images referenced in vuex store in Vue.js vue.js vue.js

Linking to images referenced in vuex store in Vue.js


:src='student.image' (v-binding) is executed at runtime, but webpack aliases work in compile time. So you have to wrap the aliased file path in require.

{  id: 1,  name: 'Advik',  age: '19',  studying: 'Physiotherapy',  image: require('~@/assets/images/students/advik-1.png')}