title: Display local images using variables react js
body: <p>I have an document in my db as follows: </p>
  
  <pre><code>doc = {
      _id: "11234324",
      image: "myimage.png"
  }
  </code></pre>
  
  <p>I want to display myimage.png which exists locally: </p>
  
  <p>path = "/Users/xxx/go/src/github.com/xxx/goapp/files/myImage.png"</p>
  
  <p>I tried:</p>
  
  <pre><code>&lt;img src={path+doc.image}/&gt;
  </code></pre>
  
  <p>It does not work. I even can't use a variable inside require() function.</p>
  
  <p>Any solutions how to solve it?</p>