[Vuejs]-Nuxt js is not loading images when switched to production environment

-4👍

It’s not necessary to use require(~/assets/establishment_img/${image}) construction in your nuxt.js app!

You can just put your static image inside /static/ folder at your nuxt project root and access it in your app using:

<img :src="`/establishment_img/${image}`" alt="preview image">

So it will be both available in dev and production modes

Leave a comment