title: Issue trying to load image from json path in CRA app
body: <p>I'm unable to load images from <code>src/assets/image</code> in my CRA app. I'm trying to avoid putting these images in my public folder but for some reason that seems to be the only way they will be displayed.</p>
  <p>I have a json file <code>homepageinfo.ts</code> with a path</p>
  <pre><code>export const homepageinfo: homepageinfoType = {
    ...
    hero_portrait: &quot;testimg.jpg&quot;,
  };
  </code></pre>
  <p>A util function file <code>dataClient</code> to import json files with the function getHomePageInfo.</p>
  <pre><code>export const getHomePageInfo = () =&gt; {
    return homepageinfo;
  };
  </code></pre>
  <p>and another file <code>HomeTitle.tsx</code></p>
  <pre><code>import React from &quot;react&quot;;
  import { Grid, Header, Image, Segment } from &quot;semantic-ui-react&quot;;
  import { getHomePageInfo } from &quot;utils/dataClient&quot;;
  
  export const HomeTitle = () =&gt; {
    let homepageinfo = getHomePageInfo();
  
    return (
      &lt;Grid columns={2}&gt;
        ...
        &lt;Grid.Column
          only=&quot;tablet computer&quot;
          verticalAlign=&quot;bottom&quot;
          textAlign=&quot;right&quot;
        &gt;
          {console.log(require(&quot;assets/image/&quot; + homepageinfo.hero_portrait))}
          &lt;Image as=&quot;img&quot;
            className=&quot;img_portrait&quot;
            spaced={&quot;left&quot;}
            src={require(&quot;assets/image/&quot; + homepageinfo.hero_portrait)}
          /&gt;
        &lt;/Grid.Column&gt;
      &lt;/Grid&gt;
    );
  };
  </code></pre>
  <p>The console.log is able to return a value for assets/image/homepageinfo.hero_portrait however it still appears blank in the actual Image component.</p>
  <p><a href="https://i.stack.imgur.com/s8GnU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s8GnU.png" alt="Image of a blank component and a console output from Firefox" /></a></p>
  <p>If I move the image to the public folder it can display but I do not want to have to put these images inside of the public folder.</p>