[Vuejs]-How to do an image as a component template, with src as a property in Vue

0👍

Your template string isn’t valid HTML.
Something like this may work:

template: '< img :src="source" :alt="alternate" :title="tit" :width="w" :height="h" />'

Check out Vue v-bind syntax here: https://v2.vuejs.org/v2/guide/syntax.html#v-bind-Shorthand

Leave a comment