Add local avatar functionality

Add functionality similar/same as existing plugin Simple Local Avatars – WordPress plugin |

Read-only archive:

Author: Dora D.

Vote count: 47

Status: Declined


  • request-add-feature


I have built an mu-plugin that enables the use of local avatars with an SVG fallback using the first letter of the user’s first name and avoids the use of gravatars altogether. In doing so, I have learned that there’s no need to change core at all.

The trick is to use the pre_get_avatar filter, which short-circuits the get_avatar function before any call to gravatar is made. So I consider this petition redundant.

1 Like

I think part of the request is the ability to upload images as avatars for individual users, not just disabling Gravatar. Do you think uploading avatar images should be left to plugins?

I do. For sites that don’t use comments, is there even a need for avatars?


Yes, I do, for several reasons:

  1. Many sites have no use for avatars at all.

  2. On sites (like mine) where the sites are locked down as membership sites or intranets, personal, uploaded avatars need to be secured from prying eyes outside just as much as the content of the site. Using a generic upload folder doesn’t achieve that, so then a site admin would have to add some code to do that anyway.

  3. Site admins (like me) may also want to have a discrete avatars folder, separate from other uploads. But that might not suit everyone.

My mu-plugin handles (2) and (3) in the way that suits me. And that’s the point of a plugin.


5 posts were split to a new topic: Core plugins discussion

At this time, this petition will be set to close as plugin functionality. We have a plugin Avatars that allows users to upload an image as an avatar with a few additional options.

I think this one is worth leaving open. The default option in core should be to use locally-generated avatars, perhaps based on the letter of the username. Code that calls out to external servers such as Gravatar should be moved to a plugin, and allowing users (with sufficient permissions) to upload their own avatars should also be explored as a plugin.

1 Like

Based on the plugin reference in the petition, the user wants the ability to upload images as avatars. There’s no mention of additional options of local avatars, like initials. Do you think we would ever consider adding uploading functionality for avatars?

For Gravatars, we do have 2 separate petitions:

We also list Gravatars as one possible core plugin, which means it would be removed from the core.

If we want to broaden the scope of this petition to include additional options for local avatars, not the uploading functionality, I would agree that it makes sense to keep it open.

I’m happy to keep it open, just want to make sure it aligns with what we’re doing.

PS. I would like to see the option to use initials for avatars built-in, that would be nice. But if not this petition, might be a good candidate for a new petition.

1 Like

OK, I guess the “Disable Gravatars by default” petition can replace this one, since having some kind of fallback in place would be necessary for when we allow disabling Gravatar.

This topic was automatically closed after 6 days. New replies are no longer allowed.