Simple Local Avatars

Add an avatar upload field to user profiles. Generate requested sizes on demand, just like Gravatar.

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!

  1. Stores avatars in the “uploads” folder where all of your other media is kept.
  2. Has a simple, native interface.
  3. Fully supports Gravatar and default avatars if no local avatar is set for the user – but also allows you turn off Gravatar.
  4. Generates the requested avatar size on demand (and stores the new size for efficiency), so it looks great, just like Gravatar!
  5. Lets you decide whether lower privilege users (subscribers, contributors) can upload their own avatar.
  6. Enables rating of local avatars, just like Gravatar.

Avatar upload field on a user profile page

  • Rating
  • Requires 6.3+
  • Downloads 1,685,973
  • Updated 2024-05-14
  1. nice and simple plugin , thanks!
    problem here:
    if a author is none-English speaker, the image name generated based on author id will be some kind none readable code, that leads the avatar wont be displayed. is there any way to fix this?
    thanks!

    • in other words, if i want the image naming method to be based on unique email address instead of author display name, what would the php code look like?
      thanks for helping !

      • Pretty sure it can take either as the first argument.

    • Possible to provide an example?

  2. Does this plugin work with 3.4.1?

    • Yep.

  3. I am using “wordpess social login” plugin and also the “simple avatars” plugin. When a user logs in with a social media account, the social login plugin will pull an avatar from the social media site. When the user tries to change the avatar with the simple avatars plugin they can upload a local plugin but the avatar doesn’t change. The avatar stays with the same social media avatar. How can I get “simple avatars” to over ride the “social login”?

    • This probably means the social plug-in is replacing the “get_avatar” function (since the function is in “pluggable”, which allows for replacement) and not preserving the “hook” that let’s us substitute the avatar. Ask the author of that plug-in to add the “get_avatar” hook from core into his function.

  4. Only the avatar shows up for admin. I have anyone that signs up as an author. Am I missing something? Thanks!

  5. Thanks for the great plugin.

    My theme has a profile edit page in front end.

    How can I integrate SLA file upload into the front end? I tried many variants but with no luck.

    Thanks!

    • Completely depends on your front end implementation (there’s no standard), but you can call the functions inside the plug-in from your front end profile code.

  6. Hey, I uploaded an avatar, but changed my mind deleted it, but now every time I try to upload any other image it comes back up with the one I’ve deleted. I’ve deleted this particular image from the media gallery, I have deleted and reinstalled the plug in several times, but every time I try to upload any image at all it just shows the first one I uploaded (and deleted). How can I fix this?

    • Sounds like a caching issue! If it has the same file name and your site is set up to aggressively cache local assets, you may need to force a full refresh.

  7. Is there any documentation? The plugin is not showing up on my site at all and I cannot find any settings options on WP for it..

    Thanks,

    • You can find documentation in the “Help” drop down on the user profile page, and here on this website. For the most part, it should “just work.” You can upload avatars on user profile admin screens, and they’ll show up where your theme calls for avatars.

  8. This plugin has a bug. I have a page (using pagination) with a ton of comments (like 10,000+). This plugin doesn’t allow the “first/default” page of comments to show up. They get cut off. http://lindseystirlingviolin.com/fans/ Unfortunately, this is the only plugin I can find that actually shows the avatars.

    • The code in this plug-in has absolutely no effect on comments display, other than to override the avatar. Maybe something in your theme?

  9. First of all, thanks for a great and simple plugin.

    But it definitely needs and upload filter for image size/dimensions.

    It wasn’t just once when users uploaded huge images, so I got “Out of memory …” error when trying to show user’s comment with avatar (even though it is shown as 48×48) and so on…

    • The plug-in will adhere to the same file size upload restrictions as all other WordPress media (by default, just the PHP settings determining max upload size). It also has a filter, for the code savvy, that allows developers to override the size. I don’t think there’s a one size fits all option here. The plug-in can support huge avatars, if that’s what the theme / plug-in calls for.

  10. Very nice, thanks.

    I am currently putting the user profile edit on the front end (as demonstrated here: http://4rapiddev.com/php/create-custom-update-profile-page-for-wordpress-users/) which works fine, but is there a way I can include your avatar upload here as well?

    Thanks in advance.

    • Not out of the box. If your savvy to plug-in coding, you can use the same hook that shows the avatar upload in the admin in your front end display code, but it will take some finessing!

      • Thanks for the prompt response Jake.

  11. I guess no one has noticed that this plugin no longer works? I have it on a couple sites and you can upload all you want, but nothing happens, and you can’t delete an existing avatar from when it was working.

    • Still seems to be working. Are all of these sites on the same server? Same multisite setup?

      • Hello, I have also problem with the avatars. Nothing shows up. I inactivated all my plugins to see if there is a problem but nope. No image shows up when choosing the file. I am using thematic theme and it work when using MAMP but then on the webserver it is empty not even a pictureframe…

      • Two different servers, multiple sites, no multisite. No longer works on any.

  12. Hello. I would first want to say I am currently using this on my main blog and am loving it. I am currently in the middle of constructing a new membership website and am trying to get everything front end. I am using a plugin called “Profile Builder” which allows users to edit account information from the front end. I am looking for a way to integrate your avatar plugin inside this plugin. I am sure it is just a case of moving some code around but I have little knowledge with editing code. Could you give me any advice or a solution as to what I am trying to achieve. Thanks and keep up for good work!

  13. Hello, I am using your plugin and am wondering how to grant my bbPress users access to upload an avatar image.

    Myself as an admin can upload an avatar image for users, but they themselves as subscribers have no way of doing so.

    Your help would be much appreciated!

    Daniel

  14. How can I use this plugin with bbPress? The feature doesn’t show on subscribers profiles, from what I am seeing. Can the plugin integrate with bbPress? Thanks for your help in advance!

    Daniel

  15. This is a great piece of code. I’m wondering if it is possible to use the form outside of the dash, like on a BBPress profile edit page which uses the same user id as wordpress?

    • No easy way at present. All of these front end implementations handle things differently, though I’m hoping to at least add bbPress / BuddyPress support.

  16. Hello. Thanks for developing this plugin.

    Recently, I change the installation folder of a WordPress site using this plugin. The only thing that didn’t change dynamically was the path references of the avatars image locations.

    To address this, I did a search and replace in the database. While I see the appropriate locations in the database (within the wp_usermeta table), the “Edit User” screen on the admin side no longer sees the attached avatar image. Therefore on the public side, they all appear as blank.gif.

    Do you have any recommendations on how I can re-attach these with a script or alternate method? There are over 100 accounts with avatars already, so manually uploading each one isn’t an option I am looking forward to.

  17. When a user uploads a big file, the site crashes for this user until i delete the file manually from ftp.

    Is possible block big files upload?

  18. Wery good plugin. You are the best!

  19. Amazing plugin!!!
    Is there anyway to integrate adding the avatar on the registration page?
    Great work!!

    • Not easily, at present.

  20. Loved your plugin and used it to upload the profile pictures of all the users who write to our site when we were in the beta phase (beta.thealternative.in). When we changed the hostname from beta.thealternative.in to thealternative.in, the plugin stopped working – none of the images are shown even though I have checked that the right URL is available in the user_meta folder and the images are on the server. What could be going wrong?

Leave a Comment

Finely crafted websites & tools that make the web better.