I have a set of images in a folder and now I want to store those images as an array format as shown below
const slideImages = [
'/assets/boatImage.jpg',
'/assets/old.jpg',
'/assets/vacations.jpg'
];
I cannot access those images though the path is correct. The folder structure is shown

I have tried the below code to access the path also but still not working
const slideImages = [
'./assets/boatImage.jpg',
'./assets/old.jpg',
'./assets/vacations.jpg'
];
This is the react code
import React from 'react';
import { Slide } from 'react-slideshow-image';
import './style.css';
const slideImages = [
'./assets/boatImage.jpg',
'./assets/old.jpg',
'./assets/vacations.jpg'
];
const properties = {
duration: 5000,
transitionDuration: 500,
infinite: true,
indicators: true,
arrows: true,
onChange: (oldIndex, newIndex) => {
console.log(`slide transition from ${oldIndex} to ${newIndex}`);
}
}
export const Home = () => (
<div className="slide-container">
<Slide {...properties}>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[0]})`}}>
<span>Slide 1</span>
</div>
</div>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[1]})`}}>
<span>Slide 2</span>
</div>
</div>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[2]})`}}>
<span>Slide 3</span>
</div>
</div>
</Slide>
</div>
);
How to solve this