title: Angular how to reference a local image into a JSON object
body: <p>In said Angular project, I have made/hardcoded a JSON object.</p>
  
  <p>How would one point to an image that is within your project.</p>
  
  <p>Example:</p>
  
  <pre><code>   picArray = [
        {
          imageIcon: 'PATH/assets/image1.png' //do not know how to do this one
        },
        {
          imageIcon: 'https://someurl.com/forsome/image.png' //this works fine
        }
     ]
  </code></pre>
  
  <p>I am trying to find the correct syntax to reference a local image to display.</p>
  
  <h2>This may be a possible SOLUTION</h2>
  
  <pre><code>   picArray = [
        {
          imageIcon: require('./assets/image1.png') // so this displayed said image
        }  
  ]
  </code></pre>
  
  <p>Not entirely sure if this is the best solution, but it did help me out.</p>
  
  <p>Here is the
  <a href="https://stackoverflow.com/questions/42793292/how-to-load-image-and-other-assets-in-angular-an-project">source</a>.</p>