Page MenuHomePhorge

Allow to import Picture from Gravatar
Open, WishlistPublic

Description

Preamble.

Phabricator de-activated hot-link of Gravatar images for performance reasons:

https://we.phorge.it/rP9dd09f717192bd9a05fb227c767960acbaa182b5

I agree with that, also because it's more privacy friendly to completely avoid external URLs. Anyway,

It seems that Phabricator was able to also import a picture from Gravatar:

https://we.phorge.it/rP1322e9eda25ce4ade857a19a54bb25d0ba814902

So my question is: where is this feature? How to use that?


Success condition:

As a registered User, I can visit a section in my profile to "Import profile picture from Gravatar" and see that file saved as my new picture.

To import that again, I just need to run that action again.


Downstream stuff:

Event Timeline

valerio.bozzolan triaged this task as Wishlist priority.
valerio.bozzolan created this object in space S1 Public.

The feature was removed for performance and private concerns. I thought Gravatar was alread dead.

Maybe this can be done as an extension:

  • Abstract the "profile picture provider"
  • Allow an extension to write a Gravatar one

There are currently 2-3 sources, so maybe there is some abstraction:

  • pokemon-style silhouette
  • Character with background (generated from username)
  • Upload Picture

The feature was removed for performance and private concerns. I thought Gravatar was alread dead.

Maybe this can be done as an extension:

  • Abstract the "profile picture provider"
  • Allow an extension to write a Gravatar one

There are currently 2-3 sources, so maybe there is some abstraction:

  • pokemon-style silhouette
  • Character with background (generated from username)
  • Upload Picture

If we're talking about abstracting, I would think we should also consider 3rd party SSO avatars (e.g. LDAP and Google) for avatars. That being said, I see no reason to not eventually move all the SSO code into extensions in the future anyway...

Chris has asked me to pick this up as he'd like to see this implemented.

@avivey and @Matthew - Are you both happy if I implement this without extracting into a separate provider for now? Seems out of scope and probably a much wider change.

As a general rule, I prefer the have the abstractions as much as possible, to allow extensions to do things.
In this case, an abstraction would also make this feature easier to enable/disable, which I think is desired.

Looking at the code now (PhabricatorPeopleProfilePictureController), there's 3 built-in sources for profile images:

  • Builtin, hard-coded in the controller
  • Accounts (filtered right there)
  • Default, which is a field in PhabricatorUser.

Of the 3, only Account has any form of abstraction/configuration.

Ideally, I'd like to have these as 3 implementations of a new abstraction, with Gravatar being in its own extension, but extension tooling isn't up to that yet.
As a first step, I think adding the abstraction, implementing only the Gravatar implementation and dumping it somewhere in rP and leaving the rest for later is fine. Since there's no refactoring needed for this (only new code), it should be simple.