title: Inline background-image in React
body: <p>I am trying to set a background image via inline styles in React.</p>
  
  <p>After looking through a few posts <a href="https://stackoverflow.com/questions/38794106/backgroundimage-is-not-working-in-react">this one</a>'s solution worked for me:</p>
  
  <pre><code>&lt;div className="phase1" style ={ { backgroundImage: "url('https://lh3.googleusercontent.com/MOf9Kxxkj7GvyZlTZOnUzuYv0JAweEhlxJX6gslQvbvlhLK5_bSTK6duxY2xfbBsj43H=w300')" } }&gt;
  </code></pre>
  
  <p>I pasted that directly into my component without changing the link just to test it, and it worked. But now that I am trying to reference an image from my <code>/src</code> folder it isn't working.</p>
  
  <pre><code>&lt;div className='background-image' style ={ { backgroundImage: "url('../../../../images/products/cards/main.jpg')" } }&gt;asdfasdfasdfasdf&lt;/div&gt;
  </code></pre>
  
  <p>Nothing shows up and I am not getting any error or warning.</p>
  
  <p>Any help would be really appreciated!</p>