0👍
Ah, i test this example, but it works.
data(){
return {
isShowImage : true,
imgArr : ['banner.jpg', 'logo.png', 'about.jpg']
}
}
<div v-for="img of imgArr">
<img v-if="isShowImage" src="/data/images/banner.jpg" style="width:100px;height:30px;"/>
<img v-else src="/data/images/logo.png" style="width:100px;height:30px;" />
</div>
<button @click="isShowImage = !isShowImage" type="button" name="button">show</button>
Are you sure your image path is right ?
Source:stackexchange.com