title: How to set image url in ReactJS
body: <p>I am trying to set the path of an Image inside a <code>img</code> tag in <code>ReactJS</code> but It is not showing...</p>
  
  <p>This is what I tried...</p>
  
  <pre><code>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 (
        &lt;Carousel
          showArrows
          emulateTouch
          infiniteLoop
          autoPlay
          interval={2000}
          onChange={this._onChange}
          onClickItem={this._onClickItem}
          onThumbClick={this._onClickThumb}
        &gt;
          &lt;div&gt;
      &lt;img src="../images/sample1.jpg" /&gt; {/*not working*/}
            &lt;p className="legend"&gt;Welcome to W.W Coders&lt;/p&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://placehold.it/1080x300?" /&gt;
            &lt;p className="legend"&gt;Faculty of Computing&lt;/p&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://placehold.it/1080x300?" /&gt;
            &lt;p className="legend"&gt;Faculty of Engineering&lt;/p&gt;
          &lt;/div&gt;
          &lt;div&gt;
            &lt;img src="http://placehold.it/1080x300?" /&gt;
            &lt;p className="legend"&gt;Faculty of Business Management&lt;/p&gt;
          &lt;/div&gt;
        &lt;/Carousel&gt;
      );
    }
  }
  </code></pre>
  
  <p>And this is my folder structure</p>
  
  <p><a href="https://i.stack.imgur.com/DjdIm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DjdIm.png" alt="folder structure"></a></p>
  
  <p>Can someone tell me where I have went wrong?</p>