Make WordPress Core


Ignore:
Timestamp:
06/30/2026 10:30:01 AM (3 months ago)
Author:
scruffian
Message:

Toolbar: Make the user avatar image circular.

Make the user avatar in the admin bar circular, both in the top-level toolbar item and the account dropdown. This aligns with the block editor, where avatars are already circular while site logos are square, and follows a common convention that helps distinguish an avatar from a site icon. The avatar is also enlarged slightly on both the desktop and mobile viewports to offset the area lost to the circular crop and to keep it balanced with the surrounding toolbar icons, as follows:

  • Desktop viewport: bump the size from 18px to 20px; add border-radius: 50%
  • Mobile viewport: bump the size from 26px to 28px; add border-radius: 50%

Developed in https://github.com/WordPress/wordpress-develop/pull/11799.

Props fushar, scruffian, joen, sabernhardt, jeryj.
Fixes #64667. See #65083, #65088.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r62349 r62592  
    277277        $howdy = sprintf( __( 'Howdy, %s' ), '<span class="display-name">' . wp_get_current_user()->display_name . '</span>' );
    278278
    279         $avatar = get_avatar( $user_id, 26 );
     279        $avatar = get_avatar( $user_id, 28 );
    280280        $wp_admin_bar->add_node(
    281281                array(
Note: See TracChangeset for help on using the changeset viewer.