title: Cannot import images in react, Module Not Found
body: <p>my react app cannot find my image file. I have tried multiple ways of importing.
  I am importing this in my App.js</p>
  <pre><code>import logo from &quot;./images/companyLogo.png&quot;
  
  &lt;img src={logo} /&gt;
  </code></pre>
  <pre><code>&lt;img src={require(&quot;./images/companyLogo.png&quot;)} /&gt;
  </code></pre>
  <p>I even saw a way by putting the images file in the public folder and import it like following: (don't know why this worked for some people)</p>
  <pre><code>&lt;img src=&quot;images/companyLogo.png&quot; /&gt;
  </code></pre>
  <p>I have checked my directory it looks fine.</p>
  <p><a href="https://i.stack.imgur.com/0sSlJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0sSlJ.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/91PEs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/91PEs.png" alt="enter image description here" /></a>
  Please help T_T</p>