I would be able to use Astro’s image in my Vue.JS component so I can import them from assets folder and benefit from performance improvements of it’s rendering.
Before using Vue.JS I was doing something like this:
regions.map((region: any) => (
<Image src={import(region.image)}
));
Now that component is made in Vue.JS like:
<a v-for="(region, index) in displayedRegions"
:key="region.name"
:href="region.url"
target="_blank"
class="block"
:aria-label="`Vai al gruppo della regione: ${region.name}`" >
<img :src="region.image" :alt="region.name"
class="absolute inset-0 h-full w-full object-cover transition duration-300 ease-in-out group-hover:scale-110" />
</a>
The images are set in /assets/images
so while the first case was working as expected, the second one does not.
7