title: can't Load local files dynamically in react js
body: <p>I want to load some local images dynamically in my app. I have a json with records like </p>
  
  <blockquote>
    <p>{name: image12, poster: 'image1.jpg'}, {name: image13, poster: 'image2.jpg'}</p>
  </blockquote>
  
  <p>I have a folder with many images like <strong>'image1.jpg', 'image2.jpg', 'image3.jpg'</strong>. When I try to render the json record i put 
  <code>&lt;img src={'./image/image1.jpg'}/&gt;</code> but it is not working.</p>
  
  <pre><code>[![import React from 'react';
  
  const Poster = (props) =&gt; {
      return(
          &lt;div className="individual-poster"&gt;
              &lt;h2&gt;{props.postData.name}&lt;/h2&gt;
              &lt;img src={'./Slices/'+props.postData["poster"]} width="100px" height="100px"/&gt;
          &lt;/div&gt;
      );
  }
  </code></pre>
  
  <p>image is not even listing in the source list also.</p>
  
  <p><a href="https://i.stack.imgur.com/UniKx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UniKx.png" alt="enter image description here"></a></p>