[Vuejs]-Vue dynamic image change onmouseover doesn't work

2👍

You should try to use the require function to get the url of your asset:

imgLink: require('@/assets/images/icon-filter-up.png')

1👍

You can import a image and use it as a component attribute:

<template>
    <img :src="imgLink">
</template>
<script>
    import imgLink from '@/assets/images/icon-filter-up.png';

    export default {
        data: { imgLink }
    };
</script>
👤lmarqs

Leave a comment