0

I have copied the Buefy carousel component from https://buefy.org/documentation/carousel#carousel-list into my Gridsome project. The carousel displays correctly with its supplied placeholder images. These are in an array in the data() segment eg

items: [
                {
                    title: 'Slide 1',
                    image: 'https://picsum.photos/id/0/1230/500'
                },

Now I want my images, not the Buefy placeholder ones. I cannot find the right way to target my local images. I have tried lots of things including

items: [
                {
                    title: 'Slide 1',
                    image: require("@/assets/img/gallery/sheep/sheep2.jpg")
                },

My attempts either break the carousel or display a broken link within it.

nigelwhite
  • 15
  • 7

1 Answers1

0

Solved. I did a new build (in my case "gridsome develop") after inserting my own image paths. Then this worked fine -

items: [
    {
      title: "Slide 1",
      image: require("@/assets/img/gallery/sheep/sheep1.jpg")
    },
nigelwhite
  • 15
  • 7