[Vuejs]-How to display an image in vuejs/vuetify whose path is in json fake server?

0👍

it depends on the data structure of response.data if it’s an array of objects that contains images field as an array of images links, then your code should work.
if response.data is a single object (which I presume) that contains images array then TypeError: Cannot read property '0' of undefined will be rised, in this case you don’t need a loop to show your 0 indexed images, just

<v-img v-if="packages.images" :src="packages.images[0]" ></v-img>

Leave a comment