Using Gravatar Image in your site

Lately, any web savvy is confounded by a slew of accounts to maintain and passwords to remember. The hassle of remembering multiple email accounts to some extent has been solved by the concept ot Open IDs. GRAVATAR addresses another such issue of managing your profile picture across a number of accounts. Be it from the perspective of maintainability or from your "online brand consistency", reusing profile picture from a single place is a cool idea. So Gravatar offers such service where one can upload an "avatar" mapped with a certain email address which can be later reused into  a number of sites. 
What is Avatar and Gravatar?
An avatar is a graphical representation of a user. It could be the person’s picture, or a random icon they want to associate with.Gravatar stands for Globally Recognized Avatar. Getting a gravatar is simple and free. Simply go to Gravatar’s website. Signup with the email that you use the most often to comment. Add an avatar of yourself. This could be a picture of yourself, your company’s logo, or something unique.
Even if you are building your own site requiring the need of maintaining accounts, Gravatar should come handy. On your side, it takes away the trouble of uploading separate images, resizing them etc, on the user's side, it gets convenient because they don't have to go through their files or facebook photos trying to find a better profile picture, or even if they don't have any "profile pic" type of picture,they could simply use one of Gravatar's default images.
Using Gravatar into your site is fairly simple. All you need to do is pass the user's email to the gravatar's url. The email is first converted to md5 hash key(can use a simple jquery plugin).
The following jquery function returns the gravatar image of the corresponding email.

function GetAvatarImage(email) {
                var base = "";
                var hash = $.md5(email);
                var fullUrl = base + hash + "jpg";
                return fullUrl;

Facebook Facebook LinkedIn LinkedIn

Leave a Comment

For Gravatar icon