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
  • 1,899
  • 6
  • 35
  • 64

1 Answers1

3

Dynamic props are created using colons:

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

Check the docs for Template Syntax and Shorthands

Slim
  • 1,744
  • 1
  • 10
  • 18