title: using Base64 images in react.js
body: <p>I am trying to use Base64 encoded images in my react app.</p>
  <p>currently I load images from a folder and looks something like this:</p>
  <pre><code>&lt;img className=&quot;...&quot; src={imageFile}&gt;&lt;/img&gt;
  </code></pre>
  <p>I want to use base64 encoded images, I think I can do this:</p>
  <pre><code>&lt;img className=&quot;...&quot; src={&quot;data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaH....&quot;}&gt;&lt;/img&gt;
  </code></pre>
  <p>the problem is that the base64 strings are huge, and for some reason I cant store them in my component.
  I tried putting them in a txt file and doing:</p>
  <pre><code>fs.readFile('image.txt', function(err, data){console.log(data);})
  </code></pre>
  <p>but I get tons of errors, including:</p>
  <pre><code>Uncaught TypeError: fs.readFile is not a function
  </code></pre>
  <p>among others.</p>
  <p>any ideas how to store base64 strings in a separate file and load them into my component?</p>
  <p>Thanks!</p>