I'm trying to take a capture of a HTMLCanvasElement, and display that result on a separate web page without uploading the image to a server. My initial thought was to save the image to local storage as a base64 image data URI, but then I looked at the uncompressed image size of the images that will be being used. @ 1920x1080 pixes, it might be around 6MB (using Photoshop to show the uncompressed size, since I didn't find a better way yet). The information I found on size limits for local storage made me think this was a bad idea.
So trying to find another solution, I've looked into using HTMLCanvasElement.toBlob()
, and saving that to the HTML5 DOM File API. But then I found Microsoft Edge doesn't support toBlob()
on canvas elements.
Then I found this answer regarding the use of the new File API, but then I found that's not supported in IE 11.
I need to support recent versions of Chrome, Firefox, and Explorer 11 and Edge.
Is there a straightforward way to do this? Is it possible, or should I just upload it to a server?