<img src="/logo.png" :onerror="defaultImg"> data() { return { defaultImg: 'this.src="' + require('../../assets/img/defaultImg.jpg') + '"' } }