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:
Gravatar gravatar = new Gravatar();
byte jpg = gravatar.download(mbox);
InputStream inStream = new ByteArrayInputStream(jpg);