WP User Avatars
Description
Allow registered users to upload & select their own avatars.
Recommended Plugins
If you like this plugin, you’ll probably like these!
Installation
- Download and install using the built in WordPress plugin installer.
- Activate in the “Plugins” area of your admin by clicking the “Activate” link.
- No further setup or configuration is necessary.
Screenshots
Faq
The project wiki covers setup, the front-end editor, theme and plugin integration, multisite and remote storage, migration and compatibility, and capability-based customization.
It works OK, but you’ll want to consider exactly what level of privacy is best for your installation.
Add the User Avatar Editor block or [wp_user_avatars] shortcode to an existing page. Both display the avatar editor for the signed-in user and do not create a profile page, registration flow, or membership system.
The block adds no heading or description by default. Add either inline in the editor when the surrounding page needs more context. The block also supports background, text, border, spacing, typography, and wide-alignment controls.
The shortcode uses the same avatar capabilities, upload restrictions, ratings, and Media Library permissions as the WordPress profile and bbPress profile integrations. Users without Media Library access can still upload their own avatar when the site’s avatar permissions allow it. Uploads can include a rating without JavaScript. Rating changes and removal also work without JavaScript when an avatar already exists. Choosing an existing Media Library image requires JavaScript.
Theme and plugin developers can render the same current-user editor with wp_user_avatars_get_editor().
The front-end editor uses semantic form groups instead of WordPress admin table markup. Themes can customize the wp-user-avatars-frontend-form classes. The block exposes --wp-user-avatars-card-* CSS custom properties on its wrapper. The block controls and shortcode expose --wp-user-avatars-button-* and --wp-user-avatars-primary-* properties on the block wrapper or an ancestor of the shortcode.
Choose a square Custom Default Avatar from the Media Library under Settings > Discussion. The selected image becomes an ordinary WordPress default for users who do not have an individual avatar. It is a site-level fallback and does not write avatar metadata to every user. Rectangular images are rejected to prevent distortion.
The setting is site-specific on multisite. Mystery Person and Blank remain available. Enable Block Gravatar when the selected fallback should be served directly without a Gravatar request.
WP User Avatars uses the image size requested by WordPress. Ask for the intended display size instead of enlarging the default 96-pixel image with CSS:
echo get_avatar( get_the_author_meta( 'ID' ), 256 );
When you only need the URL, pass the size explicitly:
$url = get_avatar_url( $user_id, array( 'size' => 256 ) );
WordPress requests a 2x source for get_avatar(), so the first example can also provide a sharper image on high-density displays when the uploaded source is large enough. Theme builders need to expose or pass the intended avatar size; CSS alone cannot recover detail from a 96-pixel URL.
WordPress creates avatar image markup. Pass meaningful alternative text as the fourth argument to get_avatar() when the avatar conveys information:
echo get_avatar( $user_id, 96, '', 'Portrait of Jane Doe' );
WordPress escapes that value when it creates the HTML attribute. WP User Avatars supplies the image URL and preserves the caller’s alternative text. It does not copy alternative text from a Media Library attachment. A directly uploaded avatar may not have an attachment, and WordPress uses the same empty value when a caller omits alternative text or deliberately marks an avatar as decorative. Leave the fourth argument empty when nearby text already identifies the person and the avatar adds no information. Themes that build their own <img> markup must set the alt attribute themselves.
WP User Avatars creates a square derivative the first time WordPress requests an uncached size for a directly uploaded avatar. To disable future plugin-owned dynamic resizing, add this to a site plugin, must-use plugin, or your theme’s functions.php file:
add_filter( 'wp_user_avatars_dynamic_resize', '__return_false' );
To allow only selected sizes, inspect the requested size with the same filter:
add_filter(
'wp_user_avatars_dynamic_resize',
function ( $resize, $user_id, $size ) {
$allowed_sizes = array( 96, 192, 256, 512 );
return $resize && in_array( (int) $size, $allowed_sizes, true );
},
10,
3
);
For a directly uploaded avatar or a locally stored Media Library attachment, a disallowed uncached request falls back to the original full-size URL. A derivative that was already cached remains available. Disallowing a size does not delete existing files or change stored avatar data. Remotely stored Media Library attachments continue to use WordPress image-size resolution.
- Community: https://wordpress.org/support/plugin/wp-user-avatars
- Development: https://github.com/stuttter/wp-user-avatars/discussions
Reviews
Replaces Gravatar
By Dennis Bareis (dbareis) on December 16, 2023
Very simplistic (which to some people is good) but not only do I want one that supplements Gravatar but has user support, this one is abandoned.
Does not replace WP User Avatar
By ctmartin2020 on April 20, 2022
Nice and simple
By mikejcandy on August 25, 2021
Refugee Seeking replacement
By sxn31 on June 12, 2021
Excellent replacement for rival plugin
By Lars (thelogbookwebsite) on May 31, 2021
Great Replacement for WP User Avatar
By Le Isaac (marg3) on May 30, 2021
Light & stable – keep up the good work!
By boogieboa on May 19, 2021
Superb, works with Elementor author box
By laymonk on March 9, 2021
Best user avatar or pofile picture plugin
By Knut Sparhell (knutsp) on November 12, 2020
Very Good
By y.ryslan on October 6, 2020
Changelog
2.2.0
- Add a site-specific custom default avatar from the Media Library.
- Publish setup, integration, multisite, migration, and customization guides in the project wiki.
2.1.0
- Add a User Avatar Editor block and
[wp_user_avatars]shortcode for normal pages. - Keep local avatars ahead of avatar providers that return early, including when their URLs match.
- Preserve the primary profile save action when avatar controls are present.
- Explain avatar display sizes and generated-size limits.
- Document avatar alternative-text behavior for themes and plugins.
See CHANGELOG.md for earlier releases.