无法使用<a>标签和Base64在Chrome上下载JPG文件

Is it a well known issue that JPG files can't be downloaded in Google Chrome via a download link using base64?

On other browsers the JPG file downloads as it should. I tested it with all other kinds of files on Chrome (txt, png, pdf). These all work. I cleared my Chrome cache, disabled antivirus, disabled all extensions, disabled firewall. None of this made a difference.

This is a screenshot of what I get when I try to download the file. Translation of the error message: "Download Failed - Network error".

Chrome can't download a file bigger then 2MB. Firefox has set this limit to 5Gb I believe.

Try Like This

Source : W3schools

<a> download attribute:

If the HTTP header Content-Disposition: is present and gives a different filename than this attribute, the HTTP header give priority over this attribute.

If this attribute is present and Content-Disposition: is set to inline, Firefox gives priority to Content-Disposition, like for the filename case, but Chrome gives priority to the download attribute.

<!DOCTYPE html>
<html>
<body>

<p>Click on the w3schools logo to download the image:<p>

<a href="/images/myw3schoolsimage.jpg" download="w3logo">
  <img src="/images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>

<p>Notice that the filename of the downloaded file will be saved as "w3logo.jpg" instead of "myw3schoolsimage.jpg".</p>

<p><b>Note:</b> The download attribute is not supported in Edge version 12, IE, Safari 10 (and earlier), or Opera version 12 (and earlier).</p>

</body>
</html>