Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for local avatars (using core get_avatar) rather than hard-coding Gravatars #14

Open
mrjarbenne opened this issue Sep 7, 2015 · 9 comments

Comments

@mrjarbenne
Copy link

Currently only Gravatars are supported. If a Gravatar for a user doesn't exist, the plugin reverts to the default image, rather than searching for a local avatar.

@pejhab
Copy link

pejhab commented Oct 10, 2015

I have the same problem in my self-hosted website (WordPress 4.3.1, p2-breathe, o2). Are there any plans to solve this problem? And in the meantime any temporary fixes?

@lancewillett
Copy link
Contributor

By "local avatar" what do you mean?

@pejhab
Copy link

pejhab commented Dec 9, 2015

By local avatar, I mean the avatar (image) which is uploaded to my self-hosted Wordpress site (WordPress 4.4, p2-breathe, o2). When I deactivate the o2 plugin, this local avatar appears next to the posts and comments by users who have uploaded an avatar to my site.When I reactivate o2, the avatars do not show anymore.

@lancewillett
Copy link
Contributor

OK, sorry if this is confusing — how do you upload an image for a user? Is that a different plugin? I don't think WordPress core supports user avatars other than via Gravatar.

@lancewillett
Copy link
Contributor

@mrjarbenne Which avatars do you mean?

@danielbachhuber
Copy link

@lancewillett get_avatar() is filterable in core, which is how some avatar plugins integrate with core. It appears O2 has a hard coded dependency on Gravatar, which doesn't respect get_avatar()

@lancewillett lancewillett changed the title Add Support for Local Avatars Add support for local avatars (using core get_avatar) rather than hard-coding Gravatars Dec 9, 2015
@mrjarbenne
Copy link
Author

Apologies. I'm using BuddyPress to upload a Profile Picture. I had forgotten that this functionality wasn't available in core, and was an option added by BP. Thanks @danielbachhuber for the clarification on what the issue really is.

@lancewillett
Copy link
Contributor

Sounds good — thanks for the notes everyone.

As Daniel pointed out: o2 can solve this by using get_avatar() instead of hardcoding Gravatar URLs.

BE-Webdesign added a commit to BE-Webdesign/o2 that referenced this issue Feb 15, 2016
This was tested using https://wordpress.org/plugins/wp-user-avatar/,
which has 200,000 active installs.  This will handle local avatars that
are using get_avatar() for functionality.  Solves Automattic#14, for most cases.
There are likely edge cases where this may not work, but for the most
part, I imagine this will add support for local avatars.
@mrjarbenne
Copy link
Author

I can confirm that this pull request sorts out this issue for BuddyPress Multisite Instances running O2 on subsites: #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants