Vue CLI quesar plugin q-image not showing image

Viewed 1075

I am using quasar as a plugin in my vue. I am having trouble using the q-image component. When I use the <img src="../../statics/infocom.png"> the code and image displayed ok but when i use it on

<q-img
    :src="'../../statics/infocom.png'"
    spinner-color="white"
    style="height: 140px; max-width: 150px"
    />

the image does not show

1 Answers

It should work fine if and only if your relative path is correct.

Or try:

  <q-img
    :src="require('../statics/infocom.png')"
    spinner-color="white"
    style="height: 140px; max-width: 150px"
    />
Related