[Vuejs]-Vuetify dynamic img not working => ../assets/

0👍

The template part of your code is not clear, however, from my understanding of what you are trying to achieve, this should work:

<template>
  <v-container>
    <v-row v-for="(benefit, index) in benefits" :key="index">
      <v-col>
        <v-img :src="benefit.icon" />
      </v-col>
    </v-row>
  </v-container>
</template>

<script>
export default {
  data () {
    return {
      benefits: [
        { 
          icon: require('@/assets/image.jpg')
        }
      ]
    }
  }
}
</script>

Leave a comment