Search code examples
flutterfirebasedartgoogle-cloud-platformfirebase-storage

Flutter: Does Firebase Storage cache my images?


In my Flutter app, I have pages with multiple user profile images. Sometimes 20 of the same user profile image. For every image, I fetch the download URL from Firebase Storage and use a FadeInImage. Will Firebase Storage count every image as a download or do the images get saved to the cache and automatically reused?

In other words, do I need to worry about saving the images to cache myself to reduce downloads and costs or does Firebase do that for me?


Solution

  • do I need to worry about saving the images to cache myself to reduce downloads or does Firebase do that for me?

    If you're reading files from Storage, it doesn't mean that they will be automatically cached on your device.

    To solve this you have to find a solution for caching, so you don't need to use bandwidth each time you display an image. For Flutter I recommend you check the accepted answer from the following post: