fchancel / v-image-magnifier

A Vue 3 plugin that provides interactive image zoom functionality. Allow users to zoom in on an image by hovering over it, providing an enlarged view of the corresponding part of the image.
MIT License
14 stars 0 forks source link

compatibility issues with ":src" #1

Open ZerXeus101 opened 1 month ago

ZerXeus101 commented 1 month ago

Is it a normal behavior that it's not compatible with :src ? I'm trying to store different paths in a ref variable and I'm trying to use this to render different images based on the different paths using :src.

fchancel commented 3 weeks ago

The src can be imported as follows and used the import as argument:

import MyImage from "@/assets/my-imagew.jpg"

//HTML PART
<VImageMagnifier
    :src="MyImage"
>

or use a path to an image stored in public repository as follows:

<VImageMagnifier
    src="/images/contexte/worldMap.jpg"
/>