Local User Avatar
Let users upload custom profile pictures directly to your WordPress site instead of relying on Gravatar. Keep all user data on your own server for better privacy and faster loading.
Use Cases
- Allow team members to upload professional headshots without creating Gravatar accounts
- Keep user profile data private by avoiding third-party services
- Use custom avatars on membership sites where branding matters
- Speed up page loads by serving avatars from your own server
How It Works
- Module adds a “Profile Picture” section to user profile pages
- Users click “Upload Avatar” to open the WordPress media library
- They select or upload an image from their computer
- The avatar is stored locally and used everywhere WordPress displays avatars
Where to Find It
After enabling this module, go to Users → Your Profile (or edit any user). You’ll see a new “Profile Picture” section with Switchboard branding where you can upload a custom avatar.
Settings
This module has no configuration options - it works automatically once enabled. The upload interface appears on all user profile pages.
Using the Avatar Upload
For Admins
- Go to Users → All Users
- Click Edit on any user
- Scroll to the “Profile Picture” section
- Click Upload Avatar to open the media library
- Select an existing image or upload a new one
- Click Update Profile to save
For Regular Users
- Go to Users → Your Profile (or click your name in the admin bar)
- Scroll to the “Profile Picture” section
- Click Upload Avatar
- Choose your image
- Click Update Profile
Avatar Display
Your local avatar automatically replaces Gravatar in:
- Admin bar user menu
- Comments sections
- Author boxes
- User lists in admin
- BuddyPress profiles (if installed)
- Any theme using
get_avatar()
Removing an Avatar
To remove an uploaded avatar and revert to the default:
- Edit the user profile
- Click the Remove button next to the avatar preview
- Save the profile
Styling
Avatars display at whatever size the theme requests. The preview in the profile editor is limited to 150px and shown in a circle. If your theme displays avatars differently, the local avatar will respect those styles.
To customize avatar display in your theme:
/* Make all avatars circular */
.avatar {
border-radius: 50%;
}
/* Add a border to avatars */
.avatar {
border: 2px solid #e5e7eb;
}For Developers
The module stores avatar attachment IDs in user meta with the key switchboard_avatar. You can retrieve it programmatically:
// Get avatar attachment ID
$avatar_id = get_user_meta($user_id, 'switchboard_avatar', true);
// Get avatar URL
if ($avatar_id) {
$avatar_url = wp_get_attachment_url($avatar_id);
}FAQ
What image formats are supported?
Any image format supported by WordPress: JPEG, PNG, GIF, and WebP. We recommend JPEG or PNG for profile photos.What size should avatars be?
Upload images at least 200x200 pixels for best quality. WordPress will generate multiple sizes automatically. Square images work best to avoid cropping issues.Does this work with Gravatar?
Yes! If a user hasn’t uploaded a local avatar, WordPress falls back to Gravatar (or whatever default you’ve set). Local avatars take priority when present.Can users upload their own avatars?
Yes, any user who can edit their own profile can upload an avatar. They need to have access to the media library, which is available to Contributors and above by default.Where are avatars stored?
Avatars are stored in your WordPress media library just like any other uploaded image. They’re included in backups and can be managed from Media → Library.For best results, ask users to upload square images (same width and height). This prevents awkward cropping when avatars are displayed in circles.
Get access to all 147 modules with a single license