Change the Default Gravatar in WordPress - WPTRINITY

Change the Default Gravatar in WordPress

You can easily replace Default Gravatar it with your own branded custom avatars.
Simply upload the image you want to use as default avatar and then add this code to your functions file

add_filter( 'avatar_defaults', 'wpe_new_gravatar' );
function wpe_new_gravatar ($avatar_defaults) {
$myavatar = 'http://example.com/wp-content/uploads/2017/01/wpe-default-gravatar.png';
$avatar_defaults[$myavatar] = "Default Gravatar";
return $avatar_defaults;
}

Now you can head over to Settings » Discussion page and select your default avatar.

Custom default gravatar