Automatic updates of Gravatar avatars?

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

I think the vast majority of people expect that if they update their Gravatar on, 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.

That’s not how it works. Gravatars are cached heavily across the whole of the Internet so it make take days or even a week for it to change. You can simply wait for that to happen if you don’t want to “push the button” required for immediate action. It’s not required.

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

1 Like

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.