Solution 1 :

You need to bind the src tag like https://v2.vuejs.org/v2/guide/syntax.html#Attributes

:src="books.cover"

OR

v-bind:src="books.cover"

Also I would suggest using book as the object of books like

v-for="(book, index) in books"

Problem :

So, i have to insert a picture to every entry in my json Book list.
the books.json list looks like this:

[
  {"id": 1,"cover": "link1.jpg","bookTitle": "X", "author": "X"},
  {"id": 2, "cover": "link2.jpg", "bookTitle": "Y", "author": "Y"},
]

and the index.html file:

    <li v-for="(books, index) in books">
     <div class="books-row">
        <img src ="{{books.cover}}">
        <div class="books-bookTitle">{{ books.bookTitle }}</div>
        <div class="books-author"><i>{{ books.author }}</i></div>
        <div class="delete-btn" v-on:click="deletebookTitle(index)">X</div>
      </div>
    </li>

do i need a function to get the images or i messed up somewhere else?

Comments

Comment posted by ABGR

On another note, You might consider changing

By