title: Import image using this.props.src in React
body: <p>I am giving my component 2 props src and alt so that it could display an image like so:</p>
  
  <pre><code>&lt;img src={require(this.props.src)} alt={this.props.alt} /&gt;
  </code></pre>
  
  <p>Running my app gives me this error</p>
  
  <blockquote>
    <p>Error: Cannot find module "."</p>
  </blockquote>
  
  <p>I tried the image URL and it is correct and works, the app just doesn't want to work when I supply require the props.</p>