Save canvas as jpg to desktop [duplicate]
Download attribute There is a new download attribute in HTML5 that allow you to specify a file-name for links. I made this for saving canvas. It has a link (“Download as image”) – <a id=”downloadLnk” download=”YourFileName.jpg”>Download as image</a> And the function: function download() { var dt = canvas.toDataURL(‘image/jpeg’); this.href = dt; }; downloadLnk.addEventListener(‘click’, download, false); … Read more