I am trying to set the path of an Image inside a img
tag in ReactJS
but It is not showing...
This is what I tried...
import React, { Component } from "react";
import { Carousel } from "react-responsive-carousel";
import "react-responsive-carousel/lib/styles/carousel.css";
export default class CarouselComponent extends Component {
render() {
return (
<Carousel
showArrows
emulateTouch
infiniteLoop
autoPlay
interval={2000}
onChange={this._onChange}
onClickItem={this._onClickItem}
onThumbClick={this._onClickThumb}
>
<div>
<img src="../images/sample1.jpg" /> {/*not working*/}
<p className="legend">Welcome to W.W Coders</p>
</div>
<div>
<img src="http://placehold.it/1080x300?" />
<p className="legend">Faculty of Computing</p>
</div>
<div>
<img src="http://placehold.it/1080x300?" />
<p className="legend">Faculty of Engineering</p>
</div>
<div>
<img src="http://placehold.it/1080x300?" />
<p className="legend">Faculty of Business Management</p>
</div>
</Carousel>
);
}
}
And this is my folder structure
Can someone tell me where I have went wrong?