0

Let's suppose we are adding users to a platform using the email address.

Until the invited users don't upload an avatar or a profile picture, the best we can display is either a generic "user icon" or a identicon (or similar).

I assume that given the email address, there's a possibility that the user is on LinkedIN, Google plus, facebook, twitter and who knows where.

Is there a library or do you have experience in writing an algorithm that will try to fetch a profile picture from multiple channels?

--edit--

I am aware of automatically generated avatars (identicon), but what I am really trying to achieve is personal avatar that belongs to the user.

Rdpi
  • 609
  • 1
  • 5
  • 13
  • Can you use Gravatar to get the profile picture with the email address? It's an incredibly popular platform and I've used it successfully myself. Also, there are libraries available! – lewiguez Nov 05 '13 at 14:51
  • gravatar.com only displays automatically generated avatars for users that haven't uploaded their own yet. Try plugging in the MD5 hash of my email address: ac01d8d04fdbc53742f47257473a8a1e – r3mainer Nov 05 '13 at 15:38
  • But it means that you uploaded your avatar on Gravatar? My typical user will definitely not upload an avatar on Gravatar – Rdpi Nov 05 '13 at 17:13

1 Answers1

1

The gravatar API is the simplest option:

http://www.gravatar.com/avatar/0123456789abcdef0123456789abcdef?s=80&d=identicon&r=g

Result:

enter image description here

The long hex number is the md5 hash of the user's email address (trimmed and lowercase). s is the avatar size.

r3mainer
  • 23,981
  • 3
  • 51
  • 88