title: Disabling CORS using js fetch
body: <p>I've looked into it and my syntax looks correct but I can't figure out what is going wrong. If I didn't include the options params, everything works fine except CORS is on, which is what I do not want.</p>
  
  <p>After adding the options with mode in the request, I am now getting this error with all requested images: </p>
  
  <blockquote>
    <p>image-cropper-modal.js:73 GET data: net::ERR_INVALID_URL</p>
  </blockquote>
  
  <p>have already tried looking here: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch" rel="noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch</a>
  and here: <a href="https://jakearchibald.com/2015/thats-so-fetch/" rel="noreferrer">https://jakearchibald.com/2015/thats-so-fetch/</a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>const options = {
    method: 'GET',
    mode: 'no-cors'
  };
  
  fetch(url, options).then(response =&gt; response.blob())
     .then(blob =&gt; {
        let reader = new FileReader();
        reader.onload = () =&gt; {
          const type = blob.type;
          const [image, dataUrl] = [new Image(), reader.result];
          image.src = dataUrl;
          const [width, height] = [image.width, image.height];
          const {minWidth, minHeight} = props.opt;
          const isWithinBounds = (width &gt;= minWidth) &amp;&amp; (height &gt;= minHeight);
          callback({
            dataUrl,
            height,
            minHeight,
            minWidth,
            width
          });
     }
     reader.readAsDataURL(blob) 
  });
  </code></pre>