Allow specifying RegEx for Gravatar matching

AI-generated summary

[/t/-/275944]

rokejulianlockhart suggested allowing regex matching for Gravatar so it could associate different email aliases to the same account. They use a unique alias for every online account, which makes Gravatar not work well. rokejulianlockhart proposed allowing a regex like [A-Za-z0-9]+\+[A-Za-z0-9]+@rokejulianlockhart\.anonaddy\.com to match different aliases.

However, maiki pointed out Gravatar works by hashing email addresses, so does not natively support regex matching. It would require changes on the Gravatar service side.

rokejulianlockhart acknowledged this but hoped it may become a more common use case as literacy improves.

supermathie explained Gravatar is designed to only get avatars for specific addresses, not patterns, to protect privacy. So regex matching is not possible by design.

rokejulianlockhart agreed the best solution may be requesting it from alternative services like Libravatar instead.

I use a different https://anonaddy.com alias for every one of my 1600 online accounts, and each alias is also uniquely plus addressed for good measure.

This isn’t because I’m a privacy advocate. I just want to be able to know where my mail comes from. This almost makes Gravatar useless for me, since without at least none of my accounts are associated with Gravatar,

Consequently, I should be able to specify something like in Discourse when choosing the Gravatar option

[A-Za-z0-9]+\+[A-Za-z0-9]+@rokejulianlockhart\.anonaddy\.com

so that it doesn’t miss my avatar simply because the alias differs.

However, I don’t know whether Gravatar’s RPC-XML API would support this.

Gravatar works by creating a hash for an email address: https://en.gravatar.com/site/implement/hash/

Gravatar as a service does not support your use case. Discourse provides a standard implementation, so it would need to change on the service side.

Does not seem likely. :slight_smile:

3 Likes

Thanks for the response. I hold out hope though, that as computer literacy improves, this shall become a more common use case.

2 Likes

This is not possible by design since gravatar is never given the email address for the user, as @maiki was saying.

The Gravatar interface supports only “give me the Gravatar for this specific email address”.

It’s a feature that protects users, not a design flaw.

3 Likes

Yeah, it seems like the best solution is to just request this server-side at Sign in · GitLab for the Discourse insteances that use Libravatar instead, although I’d still love this eventually somehow.