1

I'm trying to load images from Firebase into an imageview. My image is (test.jpg) on Firestore in a folder (products) I try to load this image into an imageview with this code:

    val imageView = findViewById<ImageView>(R.id.image)
    val storageref = Firebase.storage.reference
    val path = storageref.child("products")
    val LoadImage = "test.jpg"
    val pathReference = path.child(LoadImage)
    Glide.with(this)
        .load(pathReference)
        .into(imageView)

This should be correct. But I do get this error:

Request threw uncaught throwable com.bumptech.glide.Registry$NoModelLoaderAvailableException: Failed to find any ModelLoaders for model: gs://xxxx.appspot.com/products/test.jpg

Does anyone know what I do wrong?

chrispsv
  • 503
  • 1
  • 3
  • 21

1 Answers1

1

I think its because the reference to the storage is not a valid URL to use with Glide.

Check this answer https://stackoverflow.com/a/48762436/15259160