Automatic updates of Gravatar avatars?

Is there a way to configure Discourse to automatically update avatars when Gravatars on gravatar.com have been updated?

I think the vast majority of people expect that if they update their Gravatar on gravatar.com, that their profile avatars across all websites will be updated.

But discourse requires a manual clicking of a button to update Gravatar avatars, which is opposite of this expectation.

It means, if I update Gravatar, then I need to remember all the discourse sites that I use and go to each one to manually update the Gravatar.

I think this is very much an unexpected behavior for Gravatar users.

We currently have no job that updates gravatars in Discourse. Once we download them, they are downloaded forever.

In practice we have gotten very few, if any, complaints about this.

If you must update it for everyone you can run:

./launcher enter app
rails r 'UserAvatar.find_each {|u| print "."; u.update_gravatar!}'

It will take a while to run

2 Likes

Would this also update people who already have a custom avatar set? Or just those who don’t? I agree it’s not a necessary feature but this is an interesting option nevertheless.

1 Like

That command will do absolutely everyone, but it will not switch to the gravatar.

2 Likes

In my experience, Gravatars usually update automatically after a few minutes, at least on sites where I’ve used them. Wordpress sites are great examples.

I think a custom avatar should override that and stay put. It’s like an overriden variable, in an inner scope, which doesn’t change if the outer one does.

Many sites use gravatar in such a way that it exposes identity. They hotlink directly to gravatar. This means you can do stuff like brute force email addresses.

Discourse makes a copy of avatars.

If a user wants gravatar updates on Discourse they must click the refresh button.

1 Like