I am currently developing an application using vue and ionic, but I have encountered an issue with loading assets as the paths are not resolving correctly.
<template>
<div id="index">
<img :src="image.src" v-for="image in images">
</div>
</template>
<script>
export default {
name: 'Inicio',
data() {
return {
images: [
{src: '@/assets/xxx.png'},
{src: '@/assets/xxxx.png'},
{src: '@/assets/xxx.png'}
]
}
}
}
</script>
When I use the path specified in the src attribute such as '@/assets/xxx.png'
, it doesn't load the image properly.
However, if I manually type the src directly like this
<img src="@/assets/xxx.png">
, the image loads correctly.