Uploaded profile pic keeps getting over-ridden by gravatar (DiscourseConnect)

I’m using SSO for users to log in.

I noticed that we can upload a custom profile pic and choose an option to use it, but after logging out and logging in again, our profile pic is auto-replaced by the Gravatars. Is this a bug?

I have the setting, “automatically download gravatars” enabled, but I supposed this is for users upon account creation or email change. If users have already chosen to use their custom pic instead of the gravatar, it shouldn’t be overridden?

1 Like

If you SSO is set to override user avatars/profile pictures, it will update the Discourse avatar every time it syncs, which happens when user’s log in.

Hi @osioke

Do you mean the setting here:

I didn’t enable it for Discourse Connect (SSO) to override user avatar.

I’ve only enabled the Gravatar to auto download (but not override):

So I think this is what’s causing the problem of overriding user’s custom avatar.

I think it goes back to the issue: whether users can choose to prioritize custom pics over gravatars.

Because although gravatars are automatically loaded, if the user chooses to use custom pic in their profile, this choice should be recorded/remembered when we click Save Changes.


What’s happening now is our choice of profile pic is constantly overridden by the system upon re-logging in or reloading.

This does sound like a bug. The logic we have here is

Assuming discourse connect overrides avatar is off, that means we should only be changing the avatar when both of these are true:

  • The user has not chosen an avatar in Discourse
  • The identity provider is sending an avatar in the DiscourseConnect payload

It sounds like something might be going wrong here. @Soohian any chance you could share the URL to your site via PM?