Profile photos aren't visible

We don’t see profile photos of our users within the chat application. However, if we set the photo for the channel, we see it as expected.
We use ChannelListActivity.

Hi @Jamworks,

Can you provide me with the version of the Android UIKit you’re utilizing as well as how you’re setting profile photos for users?

uikit:2.2.2
So we have tried to send it by →
SendBird.updateCurrentUserInfo (it was success)
And from browser as well

@Jamworks,

Would you mind DM’ing me your Application ID so I can take a look at a couple of things? Additionally, could you provide me with an example user whose profile doesn’t show up?

@Jamworks,

Thank you for sending me your Application ID and user. I took a quick look and it looks like the URLs being used are note Sendbird URLs. This is okay but it makes it difficult for us to understand why the images are not loading.

Are you able to utilize a network proxy to inspect the URL calls that are being made from the UIKit? Something like Burp or Proxyman.

This would help us understand whether or not the URL for the profile image is actually being called or not.

I can update user info with this function SendBird.updateCurrentUserInfo , can it help?

Hey James, it would be nice to see what happens if you upload an image directly to Sendbird, rather than passing a URL. I still think that using something like Burp or Proxyman to see what is going on at a network level would be beneficial. We’ve not seen any reports of other customers experiencing issues with profile_urls on the Android UIKit.

I do not really understand :slight_smile:
I need to try to upload a picture of a user not as a url, but as a file?

Please describe step by step what I need to do

Hi @Jamworks,

You’ll want to utilize this link:

Essentially:

SendBird.updateCurrentUserInfoWithProfileImage(NICKNAME, PROFILE_FILE, new UserInfoUpdateHandler() {
    @Override
    public void onUpdated(SendBirdException e) {
        if (e != null) {
            // Handle error.
        }

        // A new profile images is successfully uploaded to Sendbird server.
        // You could redraw the profile in a view in response to this operation.
        ...
    }
});

I get an error Invalid value: “Profile file mimetype”.

  • As you are getting the file from your Drawable resources, your routine for creating a File object may contain an error and that’s why it’s not possible to update.

  • Do you have all the permissions granted as well?

Check our sample how in the Settings you can change your profile picture:

This file has all the functions:

Our users do not yet have the opportunity to choose a photo for themselves. But why are the photos that we put to our users in the sendbird console not displayed?

When you say:

the photos that we put to our users in the sendbird console

You mean when you upload an image from your code?
It’s because the SDK is not recognising the image as a proper file… I guess the problem is with the createFileFromResource method…

1 Like

Sorry, I probably phrased it wrong.
Our users cannot set photos for themselves, but when we try to set photos for them in the browser, they are still not visible.
We try to set it here

Let me check this information and get back to you.

@Jamworks I tested you Sendbird Application ID along with usertest4 with this sample here and it’s working fine:

Can you please try it?