EagerToLearn
EagerToLearn

Reputation: 675

Picasso is not loading Image from URL on ASP.NET Core Web API server

I'm using Picasso in my application to load image from url and it's working fine until I decided to move all of my images into my Asp.net Core Web API server.

At first I wasn't able to access the url because I forgot to enable serving static files on my server. Followed this information I was able to access the image.

And now Picasso just can't load the image, I tried to imlement onError Callback and see what the error message was and it was HTTP 404.

My code :

 Picasso.get()
                .load(imageResource)
                .placeholder( R.drawable.progress_animation )
                .into(iv);

Is there any configuration needed on my server for picasso to access the image?

FIY : I'am able to access the image via browser, no login or authentication required

Upvotes: 0

Views: 345

Answers (1)

Ajay Mehta
Ajay Mehta

Reputation: 853

I just tried your image url to load in Image View using Picasso and its loading successfully.

I tried below code:

Picasso.get().load("your_image_url").into(img_user_profile, new Callback() {

    @Override
    public void onSuccess() {
        Log.w("Image Load", "Success");
    }

    @Override
    public void onError(Exception e) {
        Log.w("Image Load", "Failed");
    }
});

If possible can you please share your bit code where you are loading image using Picasso?

Thank you

Upvotes: 1

Related Questions