Ad

Firebase Get Images Without Internet Connection In Ionic

I have to get some images that come from firebase storage. I have to load that image without internet connection I have used Firestore for getting data. Firestore data get data from cache without an internet connection so I have url of an image but the image doesn't load.

Ad

Answer

The Firestore SDK has a local cache of data that it's seen before. So whenever you read something from Firestore while you are connected to the database, it stores a copy of that data in its local cache. Then when you try to read something when you aren't connected to the database, the Firestore client can read the data from the local cache.

There is no such caching mechanism built into the Cloud Storage SDK of Firebase. But you can build it yourself, by storing the files on the local filesystem, or you can use an image loading library that has such caching built in.

Ad
source: stackoverflow.com
Ad