WordPress have a built in support for gravatars which means that WordPress will automatically fetch the avatar associated with the commenting users email address. If the email address is not associated with an avatar WordPress will display a default avatar. You as a site owner can choose between a set of default avatars but you can also add your own custom avatar. Choose default avatar from the discussion page under the settings menu.
How to add a default custom avatar
To add a custom avatar, place the following code in your functions.php located in your theme folder.
add_filter( 'avatar_defaults', 'new_avatar' ); function new_avatar($avatar_defaults) { $new_avatar = get_stylesheet_directory_uri() . '/images/custom-default-avatar.png'; $avatar_defaults[$new_avatar] = "Site name"; return $avatar_defaults; }
“Site name” is the text to the right of the avatar in the image above. Change it to something appropriate. Also, don’t forget to add the image to the images directory.