the image is not putted into the slider. I can't understand what is wrong. in my file have:
FEED -1.jpeg -2.jpeg -feed.css -feed.js
I try to change file jpeg to jpg but don't work either. is stranger because if I put other images that are used in other place of the code, (and work in other places) it don't work in the component Feed. (the file path is correct)
Is stranger too because if I put just the image into the return, inside a div or other component, don't work too.... don't make any sense.
I have the follow code:
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import "./feed.css"
import React from 'react'
const Feed = () => {
const images = [{
id: 1,
src: './1.jpeg',
alt: "Image 1"
},
{
id: 2,
src: './2.jpeg',
alt: "Image 2 "
}
];
const settings = {
infinite: true,
dots: true,
slidesToShow: 1,
slidesToScroll: 1,
lazyLoad: true,
autoplay: true,
autoplaySpeed: 2000,
};
return (
<>
<div className="tag">
</div>
<div className="imgslider">
<Slider {...settings}>
{images.map((item) => (
<div>
<img src={item.src} alt={item.alt} />
</div>
))}
</Slider>
</div>
</>
)
}
export default Feed;