title: Sending base64 image uri to ImageManipulator
body: <p>I'm trying to display thumbnails for a list of items in a mobile app. The API returns a full sized image, which I'm retrieving via XMLHttpRequest and then using FileReader to convert to base64.</p>
  
  <pre><code>http.onreadystatechange = () =&gt; {
      if (http.readyState !== 4) return;
      if (http.status === 200 &amp;&amp; http.response) {
          const fileReader = new FileReader();
          fileReader.readAsDataURL(http.response);
          fileReader.onload = () =&gt; {
              const result = fileReader.result;
              resolve(result);
          };
      } else {
          resolve(false);
      }
  };
  
  http.send(JSON.stringify(params));
  </code></pre>
  
  <p>If I use the output of this as an  or  source, it works fine. However, I'd like to shrink the image first, since there's no reason to store the full size image in memory just to display a thumbnail, so after retrieving the full image from my API file, I'm trying to pass it to ImageManipulator. </p>
  
  <pre><code>const photo = await inventoryAPI.getPhoto(credentials, this.key);
  const shrunk = await ImageManipulator.manipulateAsync(photo, [{ resize: { width: 320 } }], { base64: true });
  </code></pre>
  
  <p>For some reason though, ImageManipulator is throwing an error on this step: <code>File 'data:image/jpeg;base64,[long image data string here]=' isn't readable</code></p>
  
  <p>I'm sure there are others ways to compress base64 image data, but I'd like to know what the problem is here in case I need to perform any other operations on images retrieved this way. Any help would be appreciated. Thanks!</p>