I've just finished a prototype for a project that does similar so thought I'd put all my recently acquired knowledge to work and make this sample project:
drive.google.com/file/d/1yFU4VRNWxOfEVbSs5vkE3vu-0ImHsLY7/view
Essentially, it checks local storage for a picture and if it exists, loads it into a sprite then resizes/repositions it. If you click the picture it opens a file chooser to select a picture - in which case it loads it into the sprite and also saves it. The one gotcha is that to save a picture to local storage requires that the picture be in a binary data object which you can't populate directly from the file chooser. Instead you make an AJAX request to the file chooser to populate the binary object - then you can write it to local storage.
My project's a little more complex and also involves saving pictures to and loading from a remote server, saving them to local storage for off-line use, caching previous/next pictures in memory to speed up loading when a user switches between pictures plus cropping of photos uploaded via the file chooser before sending them to the remote server for storage - so feel free to pick my brains if you need anything more!