I'm trying to make an image link in my vue app. I've tried the following but it doesn't work:
<v-img :src="require('@/assets/my-image.png')" to="/"></v-img>
I've also tried wrapping the image in a router-link
element but no luck:
<router-link to="/">
<v-img :src="require('@/assets/my-image.png')"></v-img>
</router-link>
Any idea what I'm doing wrong. This shouldn't be that difficult.
Try this (src
vs :src
):
<router-link to="/">
<v-img src="require('@/assets/my-image.png')"></v-img>
</router-link>
i use some like this, and it works.
<a href="/">
<v-img :src="require('@/assets/logo.png')"
max-width="60"
to="/afiliacion"
width="100%"> </v-img>
</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With