0

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

EagerToLearn
  • 675
  • 7
  • 24

1 Answers1

1

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

Ajay Mehta
  • 843
  • 5
  • 14
  • Hello, thanks for the reply, I have added the code on my post, please see it, I will try your sample when I get home, maybe the placeholder is causing the issue ? Because that's the only difference between yours and mine as I can see. – EagerToLearn Apr 08 '19 at 11:18
  • May be yes, Please try without placeholder. – Ajay Mehta Apr 08 '19 at 11:35
  • Hi there, It's me again. So weird, the problem is gone, I didn't modify the code ... I just pull new source code from git hub to my home's computer and build the app again, can't understand why? Tomorrow I will re-build the app using my workplace's company to see if the problem persists. Btw, thanks for your help, I will mark yours as answer, could you please edit your answer to hide my link? I violated my company regulation by posting that link on the internet :( – EagerToLearn Apr 08 '19 at 13:08