title: create react app not loading css background images in dev or build
body: <p>I'm having difficulty with some background images not loading.  I've made some significant modifications to the initial create react app, my folder structure is now as follows:</p>
  
  <blockquote>
    <p>Note: I have omitted some files &amp; folders, if you need more please let me know.</p>
  </blockquote>
  
  <pre><code>App/
   node_modules/
   src/
    client/
     build/
     node_modules/
     public/
     src/
      css/
       App.css
      images/
       tree.png
       yeti.png
      App.jsx
    server/
   package.json
   Procfile
  </code></pre>
  
  <p>Here are the steps I take to create this issue:</p>
  
  <pre><code>$ cd src/server &amp;&amp; npm run dev
  </code></pre>
  
  <p>This will boot up the dev server and open the browser to my app, everything is working fine except for some elements on the page not displaying a image.</p>
  
  <blockquote>
    <p>Note: I load in an image <strong>yeti.png</strong> and this renders fine.</p>
  </blockquote>
  
  <p><strong>App.jsx</strong></p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import './css/App.css';
  import yeti from './images/yeti.png';
  
  const Footer = function(props) {
    return (
      &lt;div&gt;
        &lt;Yeti /&gt;
        &lt;Trees /&gt;
      &lt;/div&gt;
      );
  };
  
  const Yeti = function(props) {
    return (        
        &lt;img
          src={yeti}
          className="yeti yeti--xs"
          alt="Yeti"
        /&gt;
      );
  };
  
  const Trees = function(props) {
    return (        
        &lt;div className="trees"&gt;
          &lt;div className="trees__tree trees__tree--1"&gt;&lt;/div&gt;
          &lt;div className="trees__tree trees__tree--2"&gt;&lt;/div&gt;
        &lt;/div&gt;
      );
  };
  
  ReactDOM.render(
    &lt;Footer /&gt;,
    document.getElementById('root')
  );
  </code></pre>
  
  <p><strong>App.css</strong></p>
  
  <pre><code>.trees {
      bottom: 0;
      height: 110px;
      left: 0;
      position: fixed;
      width: 100%;
      z-index: 1;
  }
  
  .trees__tree {
      background-size: 30px;
      background: url('../images/tree.png') no-repeat;
      float: left;
      height: 50px;
      width: 30px;
  }
  
  .trees__tree--1 {
      margin: 0 0 0 6%;
  }
  
  .trees__tree--2 {
      margin: 2% 0 0 4%;
  }
  </code></pre>
  
  <p>When I inspect the elements in Chrome, the path to the images appears to be correct.  When I hover over the path to the image in the styles tab of my inspector the image appears.</p>
  
  <p><a href="https://i.stack.imgur.com/vEMTD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vEMTD.png" alt="styles source"></a></p>
  
  <p>Note that the path for the image I import is similar to the path for the background image:</p>
  
  <p><a href="https://i.stack.imgur.com/5svS6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5svS6.png" alt="enter image description here"></a></p>
  
  <p>If I were to import the <code>tree.png</code> as <code>import tree from './images/tree.png';</code> and change my two <code>&lt;div&gt;</code> elements to <code>&lt;img src={tree} role="presentation" className="trees__tree trees__tree--1" /&gt;</code> and <code>&lt;img src={tree} role="presentation" className="trees__tree trees__tree--2" /&gt;</code> the images will of course load. </p>
  
  <p>How can I get the background images to display?  I have other background images in the app that are not loading so the previously mentioned bandaid will not help me.  I'm afraid to eject my app and mess with the configuration.</p>
  
  <p>I'm also having the same problem when I build the app.</p>
  
  <p>If you need to see more of the source you can view it at <a href="https://github.com/studio174/ispellits" rel="noreferrer">https://github.com/studio174/ispellits</a> but bare in mind I have simplied this example to isolate the problem.  The issue I am having is actually in the <code>Footer.jsx</code> and <code>Footer.css</code></p>