Nuxt.js: <img :src> is not loading files from /static

Created on 5 Mar 2018  路  3Comments  路  Source: nuxt/nuxt.js

When I load images with
<img src="~/static/proyectos/rovix_1.png" width="100%"> is working ok.

But when I change to:
<img :src="image" width="100%">
being img="~/static/proyectos/rovix_1.png"
is not working.

What do I need to do for fixing it?

This question is available on Nuxt.js community (#c2555)

Most helpful comment

<img :src="image" width="100%">
 image="/proyectos/rovix_1.png"

All 3 comments

<img :src="image" width="100%">
 image="/proyectos/rovix_1.png"
<img :src="image" width="100%">
 image=require('~/assets/proyectos/rovix_1.png')

This could be fun too, in the sense that it would avoid busting cache if you reorganize your images and have file-loader name them strictly by content hash.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bimohxh picture bimohxh  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

VincentLoy picture VincentLoy  路  3Comments

vadimsg picture vadimsg  路  3Comments

bimohxh picture bimohxh  路  3Comments