Allow polling avatar from URI

This appears to already be possible in a corporate environment

but I see no reason why it should be limited to SSO.


It’s a great solution to the problems that arise when using a different e-mail address for each service.

https://www.reddit.com/r/Gravatar/comments/15ffy6v/gravatar_should_enforce_or_at_least_allow_regex/?utm_source=share&utm_medium=web2x&context=3

The code already appears to exist for Discourse

but more importantly, this is implemented elsewhere, and Gravatar and Libravatar explicitly support it well.

For instance, here’s a document I made about Libravatar’s support

https://gitlab.com/-/snippets/2590066/raw/main/s0s2gl.txt.md

  1. APIs

    email = ''.encode('utf-8')
    hash = hashlib.md5(email.strip().lower()).hexdigest()
    print(hash)
    
  2. Examples

I’m guessing a bit here, but I think that to keep serving external avatars with SSO and the discourse connect overrides avatar setting, or by adding a URL to the external system avatars url setting, you need to disable the download remote images to local site setting. So what you are wanting to do can be accomplished now, but only by preventing the downloading of all remote images.

But, I think Discourse has the functionality you are looking for with Gravatars. You can disable the automatically download gravatars site setting while keeping the download remote images to local site setting enabled.

Edit: If I am correct about how things work now, the feature you want is to have a new site setting: automatically download external system avatars.

When that setting was disabled, avatars could be served from the external system avatars url without them being downloaded by Discourse.

1 Like