title: Cannot save data:image/jpeg;base64
body: <p>I have this code that displays a color converted image for a customer on the web page, the customer can then click a download button to download the image,
  It works fine on a PC but if i try to download the image on a android phone i get the error "Can only download http or https urls"
  im guessing its because the saved image has a path like "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA8Q1JFQVRPU"
  how do i get this working? does it need to be converted or something?
  here is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>imagejpeg($gd,NULL,100);
  $outputBuffer = ob_get_clean();
  $base64 = base64_encode($outputBuffer);
  echo '&lt;a id="downloadimage" style="text-decoration:none;" download&gt;
   &lt;img id="image2" style="border:1px solid lightgrey;" width="300" height="400" src="data:image/jpeg;base64,'.$base64.'" /&gt;
   &lt;li style="padding-top:10px;textalign:center;display:block;border-radius:10px;background-color:royaleblue;height:30px;width:100px;background-color: lightgray;
  padding-left: 30px;margin-left: 80px;"&gt;download&lt;/li&gt;&lt;/a&gt;'; </code></pre>
  </div>
  </div>
  </p>