Vuetify: [Bug Report] v-img src don't work on local url

Created on 23 Oct 2018  路  3Comments  路  Source: vuetifyjs/vuetify

Versions and Environment

Vuetify: 1.3.1
Vue: 2.5.17
Browsers: Chrome 69.0.3497.100
OS: Windows 10

Steps to reproduce

When I try to load an image with v-img like this:
<v-img src="./assets/logo.jpg" ></v-img>
The result is ./assets/logo.jpg not found
but using
<img src="./assets/logo.jpg">
works correctly.
Seems that v-img can't use local resources on Vue src.

Using VUE CLI 3.

Expected Behavior

Found the logo.jpg

Actual Behavior

Don't find anything

Reproduction Link

https://github.com/vuetifyjs/vuetify

Other comments

Console result:
vuetify.js?ce5b:21920
[Vuetify] Image load failed
src: ./assets/logo.jpg
found in
VImg
VCard
VNavigationDrawer
VApp
Layout
at src/Appvue

layer 8 issue

Most helpful comment

This should be added to the documentation.

All 3 comments

vue-loader adds a require() call to <img> tags. To make this work with v-img:

Thanks KaelWD!

This should be added to the documentation.

Was this page helpful?
0 / 5 - 0 ratings