Very simple PCF Control to show Gravatar

Sending
User Review
0 (0 votes)

The Gravatar or globally recognised avatar is basically an image associated to our email id, which appears besides our comments, blogs posts, sites etc.

https://en.gravatar.com/site/implement/

To request an image of Gravatar, we need to first calculate hash of the email id and pass it to the URL

The format à

https://www.gravatar.com/avatar/{HASH}

e.g.

https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50

https://en.gravatar.com/site/implement/images/

Using this information, just created a PCF control for single line of text – email type that will show the Gravatar associated to it. It was more from learning perspective than trying to implement a business case or requirement.

This is how the control looks like within the form.

For another email id, it shows the corresponding avatar image.

For cases where there are no gravatar associated it shows the default image

And as we are using it for the email type of text field, the usual validation provided by the platform works seamlessly.

Get the tool here

https://github.com/nishantranacrm/GravatarPCFControl

Hope it helps..