Adds an avatar upload field to user profiles if the current user has media permissions. Generates requested sizes on demand just like Gravatar! Simple and lightweight.
Just edit a user profile, and scroll down to the new “Avatar” field. The plug-in will take care of cropping and sizing!
- Stores avatars in the “uploads” folder where all of your other media is kept
- Has a simple, native interface
- Fully supports Gravatar and default avatars if no local avatar is set for the user – but also allows you turn off Gravatar
- Generates the requested avatar size on demand (and stores the new size for efficiency), so it looks great, just like Gravatar!
- Let’s you decide whether lower privilege users (subscribers, contributors) can upload their own avatar
- Enables rating of local avatars, just like Gravatar
- Install easily with the WordPress plugin control panel or manually download the plugin and upload the extracted folder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- If you only want users with file upload capabilities to upload avatars, check the applicable option under Settings > Discussion
- Start uploading avatars by editing user profiles!
Use avatars in your theme using WordPress’ built in
get_avatar() function: https://codex.wordpress.org/Function_Reference/get_avatar
You can also use
get_simple_local_avatar() (with the same arguments) to retreive local avatars a bit faster, but this will make your theme dependent on this plug-in.
Contributors & Developers
“Simple Local Avatars” is open source software. The following people have contributed to this plugin.Contributors
get_simple_local_avatarfunction (props @dinhtungdu, @heyjones, @dkotter, @sumnercreations, @dshanske)
Simple_Local_Avatars::get_default_avatar_url()methods (props @dinhtungdu, @heyjones, @dkotter, @sumnercreations, @dshanske)
- Added: Ability to retrieve avatar with
WP_Postobject (props @oscarssanchez, @blobaugh)
- Added: class and ID to Avatar section on Profile Page to allow easier styling (props @dinhtungdu)
- Added: WP Acceptance test coverage (props @dinhtungdu)
- Changed: Switched to
pre_get_avatar_datafilter (props @dinhtungdu, @heyjones, @dkotter, @sumnercreations, @dshanske)
assign_new_user_avatarfunction to public (props @tripflex)
- Changed: Split the main class into its own file, added unit tests, and set up testing GitHub action (props @dinhtungdu, @helen, @stevegrunwell)
- Changed: New plugin banner and icon (props @JackieKjome)
- Changed: Bump WordPress version “tested up to” 5.5 (props @Waka867, @tmoorewp, @jeffpaul, @dinhtungdu)
- Changed: GitHub Actions from HCL to YAML workflow syntax (props @jeffpaul)
- Changed: Documentation updates (props @jeffpaul)
- Fixed: Initialize
$simple_local_avatarsglobal, enabling bundling plugin with composer (props @pauldewouters, @adamsilverstein)
get_avatarfunction that overrides the core function (props @dinhtungdu, @heyjones, @dkotter, @sumnercreations, @dshanske)
- Fixed: Do not delete avatars just because they don’t exist on the local filesystem. This was occasionally dumping avatars when WordPress uploads were stored elsewhere, e.g. a cloud service.
- New: All avatar uploads now go into the media library. Don’t worry – users without the ability to upload files cannot otherwise see the contents of your media library. This allows local avatars to respect other functionality your site may have around uploaded images, such as external hosting.
- New: REST API support for getting and updating.
- New: Use .org language packs rather than bundling translations.
- Fixed: Avoid an
- Fixed: A couple of internationalization issues.
- Choose or upload an avatar from the media library (for users with appropriate capabilities)!
- Local avatars are rated for appropriateness, just like Gravatar
- A new setting under Discussion enables administrators to turn off Gravatar (only use local avatars)
- Delete the local avatar with a single button click (like everywhere else in WordPress)
- Uploaded avatar file names are appended with the timestamp, addressing browser image caching issues
- New developer filter for preventing automatic rescaling: simple_local_avatars_dynamic_resize
- New developer filter for limiting upload size: simple_local_avatars_upload_limit
- Upgraded functions deprecated since WordPress 3.5
- Fixed translations not working on front end (although translations are now a bit out of date…)
- Hungarian translation added (needs further updating again with new version)
- Assorted refactoring / improvements under the hood
- Brazilian Portuguese and Belarusian translations
- Bug fixes (most notably correct naming of image files based on user display name)
- Optimization for WordPress 3.2 / 3.3 (substitutes deprecated function)
- Avatar file name saved as “user-display-name_avatar” (or other image extension)
- Russian localization added
- Assorted minor code optimizations
- Support for front end avatar uploads (e.g. Theme My Profile)
- Russian localization
- Fix for avatars uploaded pre-1.2.1 having a broken path after upgrade
- French localization
- Simplify uninstall code
- Fix path issues on some IIS servers (resulting in missing avatar images)
- Fix rare uninstall issues related to deleted avatars
- Spanish localization
- Other minor under the hood optimizations
- Properly deletes old avatars upon changing avatar
- Fixes “foreach” warning in debug mode when updating avatar image
- Norwegian localization
- Italian localization
- All users (regardless of capabilities) can upload avatars by default. To limit avatar uploading to users with upload files capabilities (Authors and above), check the applicable option under Settings > Discussion. This was the default behavior in 1.0.
- Localization support; German included