2👍
Got it to work by using it like so :
<img v-bind:src="user.photoUrl ? user.photoUrl : require('./assets/logo.png')">
0👍
<img v-bind:src="user.photoUrl ? user.photoUrl : require('./assets/logo.png')">
or if you are using a bundler like webpack, you can do
import logo from './assets/logo.png'
<img v-bind:src="user.photoUrl ? user.photoUrl : {logo}">
- [Vuejs]-Error in render Vuex
- [Vuejs]-Creating a vue app based on web-pack simple template using vue-cli 3.X
Source:stackexchange.com