I have a mobile html page which contains images. I want to create a button or a link which is used for a download of an image. The image should then be saved to the users mobile image gallery.
I have seen this post: How can I create download link in html?
The solution
<a href="link/to/your/download/file" download="filename">Download link</a>
is working in desktop browsers but not on mobile.
Here is a JSFiddle I made: http://jsfiddle.net/tDVqH/4/
Note: The image is created in the browser i.e., in a HTML5 canvas element. This image can be generated with canvas.toDataUrl(). The resulting image should be saved to the mobile image gallery.
How can save an image to the users mobile image gallery with a click/tap? Is there a JavaScript solution without the ser round trip with a unknown header?
Edit: I also found the following questions but they do not have an answer. Save an image to the local folder from the website by clicking a link or button in mobile browser and Save an image to a mobile phone gallery from a browser