I'm working on a VueJS project and am trying to load an image on a carousel. I am using the standard setup and have the image in the assets folder. I reference the image URL with
<v-carousel-item src="@/assets/promo1.jpg">
But this throws an Image Load Failed error when I run the server using npm run serve.
console.js?66f6:36 [Vuetify] Image load failed
src: @/assets/promo1.jpg
found in
---> <VImg>
<VCarouselItem>
<VCarousel>
<Home> at src/views/Home.vue
<VApp>
<App> at src/App.vue
<Root>
If one of the suggestions is messing with the webpack config, I can't seem to find that. Also, note that the initial image on the starter template worked fine. But my custom images don't work.
@/assets/promo1.jpg
in code etc... provide more info I guess. – Triolet:src="require('@/assets/promo1.jpg')"
– Triolet<img>
instead ofv-carousel-item
? Does the image work if you try to load it in the same matter i.e.<img src="@/assets/promo1.jpg">
? – Triolet