vue image src
<img v-bind:src="'/media/avatars/' + joke.avatar" />
vue image src
<img v-bind:src="'/media/avatars/' + joke.avatar" />
add images in data object vuejs
<template>
<div id="app">
<img :src="image" />
</div>
</template>
<script>
import image from "./assets/logo.png"
export default {
data: function () {
return {
image: image
}
}
}
</script>
vue dynamic image src
<template>
<div v-for="pic in pics">
<img :src="getImgUrl(pic)" v-bind:alt="pic">
</div>
</template>
<script>
getImgUrl(pet) {
var images = require.context('../assets/', false, /\.png$/)
return images('./' + pet + ".png")
}
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us