I'm working on a game concept that allows for the user to create a character, and part of this involves the user browsing their device for an image that will be used for the character. I have been able to select an image using the filechooser and then use the URI to lead a sprite just fine.The issue arises when I try and find a way for the image they selected to be saved for later game sessions. The URI code that the filechooser provides seems to expire when you restart the game, and using a savestate does not seem to preserve the image either.
Am I just doing this wrong, or otherwise is there a different way to accomplish this?
Edit: I settled on storing base64 encodings of the images in an array in the local storage, and then injecting those encodings into my sprites later. I consider this solved.