vue-cli3 public folder img doesn't show up
问题 Does anyone know how to use the src attribute with an img file in a vue project's public folder? The browser is not finding the image. I'm using Vue CLI 3.7.0 ▼ folders | +-- src | +-- public | +-- favicon.ico +-- logo.png +-- index.html I've tried something like :src="xxx" , but that didn't work. <template> <div> <img :src="'/favicon.ico'"> <img :src="`${publicPath}favicon.ico`"> </div> </template> <script> export default { data: function() { return { publicPath: process.env.BASE_URL }; } }