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 5.7+
  • Downloads 1,613,536
  • Updated 2023-12-13
  1. Is there a way to limit the file size an end user uploads?

  2. I am currently making a propper design instead of the cheesy one I use for my website atm, and just started using WordPress.

    If I am lucky, you just thought this was a cry for help (: I actually just want to say thank you! It’s working perfectly! You’re doing a great job mate :)

  3. Hi Jake. I activated the plugin and went to the Profile screen and uploaded a 96×96 avatar png picture. Once I click ‘Update Profile’ the image is saved to the uploads folder but the image is not displayed. I changed the image type with no change. The image is resized i.e. suffixed with 33×33 etc. automatically. When I right click and open in a new tab, the result is file not found but I can see them when I connect via FTP. I have Googled but can find any assistance. Can you help?

  4. First, this is a great plugin that plays well with others…clean code is good!

    I’m using this plugin on a site I’m developing which includes functionality for custom user roles that provides them with a profile page on the front end. This plugin integrates nicely in terms of functionality, but I needed more control over the presentation. I created a simple way to use a template which I thought I’d share in case you’re in the mood for adding this functionality, or in case one of your users wants to do what I did.

    There’s a function called “edit_user_profile” which displays the form fields. I simply replaced the body of the function with an include statement pointing to my template: include get_stylesheet_directory().’/plugins/avatars/profile-avatar.php’;

    This points (obviously?) to a directory in my theme directory where I keep templates for the various plugins I’m using. Basically all you need to do to create a template is copy the body of the function and put it into a PHP file. You’ll have all your template tags available, so you can go crazy. For instance, I have different profile pages for back-end and front-end users. The template knows which one is calling it, and it displays the content accordingly.

    Anyway, this is a bare-bones explanation, but it was extremely simple to do with your well-written plugin. Hope it’s interesting/helpful…

    –Roland

  5. thx!

  6. Very simple and good PlugIn thx ;)

  7. Ничего не понимаю, но хотела бы, что бы на моем сайте у комментирующих были нормальнве аватары, плагин скачала и активировала

  8. Thanks for your nice plugin.

    But I found that the local avatar can change the avatar pic at the post (single.php) but it is unable to change the pic at author.php. The pic at author.php remains to be the old default pic.

    Anything I can do to fix it ?
    Thanks!

    • Sounds like a glitch in how this theme is calling the avatar in author.php, though logic is improved in the forthcoming 1.5 update.

  9. Is it possible to add avatars to author’s blog posts with this addon?

  10. the plugin won’t let me use the validate_gravatar() function. can you offer a fix?

    • There is no validate_gravatar() function in WordPress. The only reference I could find to this was an *example* of a validation function written up on the Codex, intended for Gravatar.

  11. A very nice plugin Jake chapeau.

    (working here with WP3.3.2 and its flawless so to say)
    We want to make it only possible for admins to upload/change and nobody else. Can you please tell where/what to change in simple-local-avatars.php .

    Thanks in advance for your time and effort.

    • Under Settings > Discussion, you’ll see a new option down at the bottom for limiting avatar uploads to users with media upload capabilities.

  12. Great! Works out of the box!

  13. The images are not uploading… do you think I have permission error?

    • What’s the error? Do regular media uploads work?

  14. The avatars are not showing when they are local. You state image is located in the uploads folder. Does this need to a specific folder or does the image upload to the current upload folder? Example uploads > 2012 > 05

    If I work it out myself as an admin to the blog below, I will repost.

    http://mummaelectric.com/happy-weekend/#comments

    Thanks for offering this free wordpress plugin!

  15. Hi,
    I have a custom profile page for members, and I am wondering how to add the option of adding/changing their avatar on this page. What code is required?
    Thanks!

    • Unfortunately, there’s no simple explanation. Different custom profile pages behave in very different ways. That said, the code is pretty well organized, and a capable WordPress developer should be able to adapt it with a few hours of work.

  16. This plugin works great. I wanted an easy (read: for the coding-impaired) fix to my avatar situation. Thanks!

  17. Yo Jake,

    first off: awesome job! Thanks mate!

    One bugfix / feature request:

    Currently you are calling “load_plugin_textdomain()” from the “admin_init” action. That way however, translations will not work in the frontend (if used in conjunction with theme-my-login, for instance).

    “load_plugin_textdomain()” should hence be called from the “init” action instead.

    Suggested edits:

    Add the following to the constructor:
    add_action( ‘init’, array( $this, ‘init’ ) );

    Add the following to the “Simple_Local_Avatars” class:
    public function init() {
    load_plugin_textdomain( ‘simple-local-avatars’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/localization/’ );
    }

    Remove “load_plugin_textdomain()” from “admin_init” method

    • Our thinking was that the translated strings only appear in the admin, by default, so we didn’t want to waste the overhead on general init. However, you’re right, this is important for front end integrations, and we’ll address it.

  18. I’m new to this whole web design concept and your plugin has been great, but I still get the default gravatar anynomous pic when I try to insert the avatar at the beginning of a post. I apologize if this is a rudimentary question, I’m a novice. Any suggestions?

    • Are you passing the author’s ID ( get_the_author_meta('ID') ) into the get_avatar function?

  19. Hi Jake.
    Just wondered if you’d seen this:
    http://wppotw.com/simple-local-avatars

    :)

  20. Hi there,

    I loved this plugin but ever since worpress update I get a ‘broken image’ link for my uploaded avatars. I’ve had to disable it. I’m hoping you intend to update it for the new version of wordpress.

    Do you know why I’m getting a ‘broken image’ link instead of my previously good avatar images? Any suggestions? If you can help I would greatly appreciate it. I loved having all special avatars for my investigation team vs others and they all loved it too.

    I’m hoping you can help me. Thanks in advance Barb

    • Well, it’s definitely not a result of WordPress 3.4. In addition to this very site, we manage a few client sites running Simple Local Avatars, and haven’t seen any unexpected results. Were you running the latest version of the plug-in when you upgraded? Do you have any information about your hosting environment (e.g. is it Linux based, Windows based…)?

      • Hi Jake
        I had this up and running before wp upgrade. I noticed the broken image links after the upgrade. It’s a linux based system I’ve kept it installed but I’m really at a loss as to what happened. I know my users have all asked why I removed their local avatars and I’ve tried everything I know to replace but it’s just a no go. Anyway I’d appreciate anything you or your users have to offer in the way of help. Thanks again, Barb

Leave a Comment

Finely crafted websites & tools that make the web better.