Antonio Laguna
Antonio Laguna

Reputation: 9290

Data-64 image links on IE/Edge

I'm crafting an image with canvas and allowing the user to download it with a link. Browsers that support download will use that.

However, it doesn't work on IE nor Edge. Can't find any information relating this issue. I've made a quick jsbin for it.

https://jsbin.com/keyegazehu/edit?html,output

Basic code is something like this

<a href="data:image/png;base64," download="image.png">
  <img src="data:image/png;base64,">
</a>

It works on any other browser.

Upvotes: 2

Views: 2284

Answers (1)

Antonio Laguna
Antonio Laguna

Reputation: 9290

So after much digging I couldn't find any suitable fix for this. However using https://github.com/eligrey/FileSaver.js/ is a good workaround as it deals with loads of quirks for all browsers.

If you run into this problem this is my suggestion.

Upvotes: 2

Related Questions