-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
- [Vuejs]-VueTwo Way Data Binding with Nested Components
- [Vuejs]-Heroku nuxt production deployment is using staging config vars
Source:stackexchange.com