actually, here:
<?php
/*
Plugin Name: Gravatar
Plugin URI: https://www.gravatar.com/implement.php#section_2_2
Description: This plugin allows you to generate a gravatar URL complete with rating, size, default, and border options. See the <a href="https://www.gravatar.com/implement.php#section_2_2">documentation</a> for syntax and usage.
Version: 1.1
Author: Tom Werner
Author URI: https://www.mojombo.com/
CHANGES
2004-11-14 Fixed URL ampersand XHTML encoding issue by updating to use proper entity
*/
function gravatar($rating = false, $size = false, $default = false, $border = false) {
global $comment;
$out = "https://www.gravatar.com/avatar.php?gravatar_id=".md5($comment->comment_author_email);
if($rating && $rating != '')
$out .= "&rating=".$rating;
if($size && $size != '')
$out .="&size=".$size;
if($default && $default != '')
$out .= "&default=".urlencode($default);
if($border && $border != '')
$out .= "&border=".$border;
echo $out;
}
?>
thats fairly straight forward.
https://en.gravatar.com/site/implement/wordpress