title: How to fetch all images from a folder in Firebase Storage?
body: <p>I'm working on an story view application in which I've created a &quot;stories&quot; folder in firebase storage under which there is a folder with the &quot;userID&quot; and inside userID, I've stored all the stories of the respective user.</p>
  <p>Now, I'm trying to fetch all those stories of the respective user. Here, is my function which I used to fetch the images but it gives me error &quot;Image failed to load&quot;</p>
  <pre><code>  String storyUrl = &quot; &quot;;
    void fetchstory() async {
    final ref = FirebaseStorage.instance.ref().child('stories');
      ref.listAll().then((value1) {
        value1.items.forEach((folder) {
          folder.listAll().then((value2) {
            value2.items.forEach((stories) {
              stories.getDownloadURL().then((value) {
                storyUrl = value;
              });
            });
          });
        });
      });
    }
  </code></pre>