[Vuejs]-Django + Vue.js can't display images from database

0๐Ÿ‘

โœ…

you should concat your base dir with the image file name:
and i think here, there is no base url in your src image it should be like:

<img :src="'127.0.0.1:8000/static/'+f.fundraiser.fundraiserImage.url">

0๐Ÿ‘

I am not a vue dev but I think this should work.

<li v-for="fundraiser in fundraisers" v-bind:key="fundraiser.id">      
    <img src="${fundraiser.fundraiserImage.url}" width="500">
</li>

Leave a comment