0👍
the best way is to add File Loader.
<template>
<img :src="image"
</template>
<script>
import image from 'relative/path/to/image'
export default {
data() {
return {
image
};
}
};
- [Vuejs]-Can't delay using data in Vue for after getting value from database
- [Vuejs]-Vue + TypeScript + Firebase: How to Type an object containing a `ref` of a firebase `User`?
0👍
Use @
sign to point to root folder
<template>
<div class="container">
<h1>Página de Inicio</h1>
<hr>
<img :src="require('@/assets/logo.png')">
</div>
</template>
Source:stackexchange.com