Vue js with parcel bundler cannot load dynamic images
<li
class="list-group-item"
v-for="(element, index) in carouselImages"
:key="index">
<img
v-if="carouselImages.length"
class="e-carousel-image"
:src="element.image.filename" />
<el-button
type="danger"
@click="removeImage(element._id)">X</el-button>
</li>
not working give us 404 when using relative path its working properly and changing path to hashed
src="../../../assets/uploads/carousel-1534888549715.jpg"
How we can solve it ?
:src="require('element.image.filename')"
– Oidelement.image.filename
? – Oid:src="'../../../assets/uploads/' + element.image.filename"
– Oid