how to display images in a carousel using v-for

<div
  id="carouselExampleSlidesOnly"

  class="carousel slide"

  data-ride="carousel"

>

  <div class="carousel-inner">

    <div v-for="(item, index) in banners" :key="index">

      <div class="carousel-item active">

        <img :src="url + require(' index   item.path')" class="d-block w-100" alt="..." />

      </div>

    </div>

  </div>

</div>

The code provided is currently not properly formatted for this forum. In its current state it’s illegible which makes it hard for people to help you.

Please read the following guide about how to properly format code and then edit your topic accordingly.

Thanks!

1 Like

I don’t know what this is supposed to be doing but it definitely looks wrong:

Could you elaborate on what you’re trying to do, what the values involved are, what the correct path is, etc.?