Preload image



how to preload image inside a div with v-if directive ?

example :

 <div v-if="isActive">
    <img :src="require('../assets/image.jpg')" alt="">

my purpose is to preload the image inside the v-if to be showed instantly when isActive is true
and add a spinner untill the big image is not fully loaded.

How would you do that?