title: Error: Cannot find module - Local path of image won't load in vue.js
body: <p>I'm making a movie library using electron.js + vue.js with json as my database. All data has been loaded from the database except the image path inside won't load.</p>
  
  <p>I tried to use require() to load the local path of the image but it always throws me an error of Error in render: Error: Cannot find module file path.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;v-card v-for="movie in movies" :key="movie.id" class="pa-5"&gt;
        &lt;v-card-title primary-title&gt;
          {{ movie.id }} - {{ movie.title }}
        &lt;/v-card-title&gt;
        &lt;v-card-text&gt;
          {{ movie.year }}
        &lt;/v-card-text&gt;
        &lt;v-img :src="getImage(movie.poster)" /&gt;
  &lt;/v-card&gt;
  </code></pre>
  
  <pre><code>import axios from 'axios'
  
  export default {
    components: {},
    data() {
      return {
        movies: [],
      }
    },
    methods: {
      fetchData() {
        axios.get('db.json').then(res =&gt; {
          return this.movies = res.data.movies
        })
      },
      getImage(poster) {
        return poster ? require(`${poster}`) : ''
      }
    },
    async created() {
      this.fetchData()
    }
  };
  </code></pre>
  
  <pre><code>{
    "movies": [
      {
        "id": 0,
        "title": "Aladdin",
        "year": 2019,
        "poster": "../../../posters/aladdin_2019.jpg"
      },
      {
        "id": 1,
        "title": "Alita Battle Angel",
        "year": 2019,
        "poster": "../../../posters/alita.jpg"
      }
    ]
  }
  </code></pre>