pablocattaneo
10/20/2018 - 11:40 AM

Get img from assets in vue

Get img from assets in vue

Source: https://stackoverflow.com/a/49225010/3599272

<template>
  <img src="@/assets/images/home.png"/>
</template>
<script>
  var icon = L.icon({
    iconUrl: require('./assets/img.png'),   // was iconUrl: './assets/img.png',
    // ...
});
</script>