I wanted to get some feedback on my local file storage strategy for storing images, and to see if there is a better way of doing it. I’m using Firebase (db & storage)
I want to pre-load a bunch of images and store them on the device so they load offline and hopefully quicker
the second/third/forth time etc. As an example I currently upload the users profile image in an online (browser base) admin area. When my app loads it gets the url for the image from the db on firebase.
My thoughts were to hash the image url and then check to see if a file which has the hash as a name exists in the local file storage. If it does, serve up the image from local storage, otherwise download and save the image locally. This way I can ensure if the image is updated, I’ll know to update the local storage.
I would love to hear from anyone who has done something similar? or if there’s a more efficient way of doing this?