I have this in my template :
<div class="row">
<div v-for="(page, index) in paginatedImages" :key="index" class="col-lg-4 col-md-6">
<div class="single-gallery">
<img :src="page.path" :alt="page.alt">
</div>
</div>
</div>
And on script for loading the images dynamically I have :
<script>
export default {
name: 'Gallery',
data() {
return {
galleryImages: [
{
path: '@/assets/images/services/whitening/whitening1.png',
category: 'teeth-whitening'
},
{
path: '@/assets/images/services/all6/all63.png',
category: 'all6'
},
// Add other images with categories
],
};
}
</script>
and the problem is that do not load the images dynamically
I try to load the images dynamically and i have the following error:Failed to load resource: the server responded with a status of 404 (Not Found)
The issue might be with the way you're referencing the image paths. You need to use "require" to use dynamic paths .