Customizing WordPress Admin – How to Change the Avatar size

You need to hook into wp_admin_bar action and alter the corresponding object. Something along these lines will do the trick for you. Place the following code to your functions.php.

function _update_avatar_size( $wp_admin_bar ) {

    $user_id      = get_current_user_id();
    $current_user = wp_get_current_user();

    if ( ! $user_id )
        return;

    $avatar = get_avatar( $user_id, 30 );
    $howdy  = sprintf( __('Howdy, %1$s'), $current_user->display_name );

    $account_node = $wp_admin_bar->get_node( 'my-account' );

    $title = $howdy . $avatar;
    $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => $title
    ) );

}
add_action( 'admin_bar_menu', '_update_avatar_size', 999 );

(Don’t forget to override the admin stylesheet to display the larger avatar.)