how to display images in a carousel using v-for


  class="carousel slide"



  <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="..." />





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.


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.?