free image hosting with the ability to get the url [closed] Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of free image hosting with the ability to get the url [closed] without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I have about ~200 images that I want to use in my android app. I want to upload them to any hosting service and then load them using Glide. after uploading the images I want them all to have the same base URL for example www.hosting.come/myprofile and append the file name to it.

I have tried to do so with Google firebase and imgur.com and imagebb.com but none of them work for me. any ideas?

Answer

You can easily use Firebase’s Cloud Storage for this.

  1. Open up your Firebase console and navigate to your project.
  2. Under “Develop”, select “Storage”.
  3. (Optional) Create a folder called “images”.
  4. Click the “Upload file” button and select all your images.

This may take awhile to upload if you have a large number of images, but it’ll work.

Now, within Android, you can fetch the url very easily.

// get a reference to your image whatever it's called   
val ref = FirebaseStorage.getInstance().reference.child("images/my_image_001.png")

// get the actual download Url and load it into your imageView
ref.downloadUrl.addOnSuccessListener {
    Glide.with(context)
        .load(it)
        .into(imageView)
}
We are here to answer your question about free image hosting with the ability to get the url [closed] - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji