title: Images not loading when deploying to Github pages
body: <p>I am using <code>create-react-app</code> to develop my react app and deploy it to Github pages. My app works correctly on development. But when I deploy, it successfully deploys but the background image failed to load.</p>
  
  <p>loading background image in a <code>index.css</code> file:</p>
  
  <pre><code>body::after {
    background-image: url("/background-img.jpg");
  }
  </code></pre>
  
  <p>The homepage on <code>package.json</code></p>
  
  <pre><code>{
    "homepage": "http://bigfanjs.github.io/my-repo/",
  }
  </code></pre>
  
  <p>Background image on app directory:</p>
  
  <pre><code>| build
      | background-img.jpg
  | src
  | public
      | background-img.jpg
  </code></pre>
  
  <p>And on the console:</p>
  
  <blockquote>
    <p>GET <a href="https://bigfanjs.github.io/background-img.jpg" rel="noreferrer">https://bigfanjs.github.io/background-img.jpg</a> 404 ()</p>
  </blockquote>
  
  <p>Finally when I edit the URL on developer tools to <code>url(/my-repo/background-img.jpg)</code> it loads.</p>