I am generating a GIF in the browser, and so the only link to it I can use is an inline data URL. (Like data:image/gif;base64,...
)
I want to allow the user to download the GIF they created. To make it as easy as clicking on a link, I am using an a[download]
like so:
<a download="GIF" href="data:image/gif;base64,...">Download</a>
With small files, this opens my MacOS "save as" dialog. With this GIF, it does not. Nothing happens when I click on the link, except that the Chrome icon changes to look like this:
When I right-click on the GIF and select "save image as", I can save it just fine. This allows me to see that the GIF is a whopping 3MB.
I have checked with a large file linked to in the usual fashion, and the a[download]
link works just fine. This seems to only be a problem with inline, data-URL files.
Is there a file size limit?
Bonus questions:
- Why is there a file size limit?
- Is there a workaround?