Gravatar and SEO

An article on WPMUDEV says

Did you know that Gravatar is part of the Automattic family? This means that any website—including your own WordPress site—linked to Gravatar can pull in the profile you’ve created there. This ensures that your website URL will show up on any site where your Gravatar bio does (like when you comment on another blog). Thus you get a backlink for better SEO.

We support Gravatar in our LMS. Since the LMS is coded in Java we use a Java library for Gravatar (https://github.com/ralfebert/jgravatar). The code is quite simple:

String mbox=DataBaseLayer.getEmail(student_id);

int size=512000;
Gravatar gravatar = new Gravatar();
gravatar.setSize(50);
gravatar.setRating(GravatarRating.GENERAL_AUDIENCES);
gravatar.setDefaultImage(GravatarDefaultImage.IDENTICON);

byte[] jpg = gravatar.download(mbox);
InputStream inStream = new ByteArrayInputStream(jpg);
DataBaseLayer.updateStudentPhoto(student_id,inStream,size);

 

Leave a Reply

Your email address will not be published. Required fields are marked *