Vuetify-module: Images in assets folder not found when using v-img component

Created on 19 Nov 2019  路  3Comments  路  Source: nuxt-community/vuetify-module

Module version
@nuxtjs/[email protected]
[email protected]

Describe the bug
Using "~url" syntax to access an image within assets folder doesn't work inside v-img component.

To Reproduce
Steps to reproduce the behavior:

  1. Add an image in assets folder
  2. Access that image inside v-img

Expected behavior
The image should be displayed

Screenshots
Current Code
image

Code Output
image

Additional context
NA

Most helpful comment

Hi @jimb0dii Try like this
<v-img :src="require('~/assets/images/background-1.jpg')" />

All 3 comments

Hi @jimb0dii Try like this
<v-img :src="require('~/assets/images/background-1.jpg')" />

Hi @jimb0dii Try like this
<v-img :src="require('~/assets/images/background-1.jpg')" />

Thanks it works.

@jimb0dii please close the issue if it's work's fine. 馃檪

Was this page helpful?
0 / 5 - 0 ratings