using indexedDB to store image, TODO: smooth load