This is a demo on storing the images as base64 string in indexed DB using JsStore.
It would be very easy to understand if you are familiar with Jquery and JsStore. In case you need, you can go through Jquery Tutorial and JsStore Tutorial.
We are just converting the image into base64 String and storing it in the Indexed DB as a string and use that string to display the image whereever needed.
You can check the live demo here.