Question

I am developing an application that requires editing an image by converting it into a canvas an the save the changes as an Image. So my doubt is that, can this Data URL be passed along the application and save to local storage of the browser to be produced back as an image when the application is loaded ??

Was it helpful?

Solution

Yes, why not.

Only problem is that canvas creates very large filesizes and local storage has a size limit. For production keep limit the use of local storage to 2,5mb. That should cover most browsers.

A better solution would be to post the data url to a server and retrieve it later.

Check it out yourself, compare filesize of your canvas created png to the filesize of optimized png's data url

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top