[Vuejs]-V-img load dynamic images raise eror [Vuetify] Image load failed

0👍

So you are saying that the image is bound correctly and displays, but the issue is with the change in URL after the emit via EventBus happened? If it had not worked in the first place, I’d have assumed you might need something related to require. Many times for static images that’s the issue. You’d have to write

<v-img src="require('http://domain/logo.png')"></v-img>

However, I could not get this syntax to work with my own dynamic variables coming from a v-for="card in cards" myself until I used

<v-img  :src="require('@/assets/' + card.imgSrc + '.jpg')"></v-img>

which I find rather dissatisfying.

Leave a comment