0

How can i show an image inside a VueJs loop?

I do use : <img src="/store/{{store.image}}">

I try to show an image inside a v-for loop, but this situation shows this error message:

Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.

This is my v-for:

  <slide v-for="store in stores" :key="store.id" :store="store">                    
        <div class="rows is_block "> 
              <vue-flip active-click=1 class="is-block">
                <div slot="front">
                  <img src="/store/{{store.image}}">
Ângelo Rigo
  • 2,039
  • 9
  • 38
  • 69

1 Answers1

3

Dynamic props are created using colons:

<img :src="'/store/'+store.image">

Check the docs for Template Syntax and Shorthands

tony19
  • 125,647
  • 18
  • 229
  • 307
Slim
  • 1,924
  • 1
  • 11
  • 20