Vue.js img src concatenate variable and text

You can’t use curlies (moustache tags) in attributes. Use the following to concat data:

<img v-bind:src="https://stackoverflow.com/questions/40255291/imgPreUrl +"https://stackoverflow.com/questions/40255291/img/logo.png"">

Or the short version:

<img :src="https://stackoverflow.com/questions/40255291/imgPreUrl +"https://stackoverflow.com/questions/40255291/img/logo.png"">

Read more on dynamic attributes in the Vue docs.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)