Customize default avatar

If you are bored by the default avatars that comes with WordPress, you can easily add your own. Just create or download a better looking one, and then add the following to functions.php.

Code Snippet:

// Make a new default gravatar available on the dashboard
function newgravatar ($avatar_defaults) {
    $myavatar = get_bloginfo('template_directory') . '/images/tweaker.jpg';
    $avatar_defaults&#91;$myavatar&#93; = "Tweaker";
return $avatar_defaults;
add_filter( 'avatar_defaults', 'newgravatar' );

Posted in Comments