Use Gravatar image as WordPress favicon

Gravatar stands for Globally Recognized Avatar. It is globally recognized because millions of people and websites use them. To know more about Gravatar, you can visit

To use Gravatar image as favicon on your WordPress site, add the following code in your theme’s functions.php file..

// Add the following code in theme's functions.php file to use Gravatar image as favicon (16×16 favicon.ico)
function dcg_gravatar_favicon() {
// Replace email here
$GetEmailHash = md5(strtolower(trim('')));
<link rel="shortcut icon" href="<?php echo '' . $GetEmailHash . '?s=16;'; ?>" type="image/x-icon" />
add_action('wp_head', 'dcg_gravatar_favicon');

view raw
hosted with ❤ by GitHub

Leave a Reply

Please note: These tutorials are meant to be helpful, but please note that I can not and will not be able to help with any implementations or modifications.

tl;dr If you do not understand it, hire me to do it.