Automattic / Automattic/co-authors-plus
Javascript Implementation for the Author Box on a post loads Gravatar would like to support WP Avatar or BP Avatar
- Dominant language
- PHP
- Stars
- 322
- Forks
- 216
- Avg merge
- 7h 50m
- Merged PRs (30d)
- 65
Description
Hello,
I opened a support ticket - https://wordpress.org/support/topic/javascript-author-box-rendering-of-avatar-uses-gravatar?replies=1#post-7210800
But figured this might be a better place to discuss the issue.
When editing a post the author box is generated via javascript;

This javascript implementation simply uses the gravatar url comprised of the users MD5 email;
```
// Adapted from http://www.deluxeblogtips.com/2010/04/get-gravatar-using-only-javascript.html
function get_gravatar_link(email, size) {
var size = size || 80;
// need to check if page is secure or not
var gravatar_url = 'http://www.gravatar.com/avatar/';
if ("https:" == document.location.protocol) {
// secure
gravatar_url = 'https://secure.gravatar.com/avatar/';
}
return gravatar_url + MD5(email) + '.jpg?s=' + size;
}
```
When using Buddypress or WP Avatar the avatars are loaded into the actual system and gravatar is just a fall back. I'd like to support Buddypress Avatars and was wondering if there's anyway to access them through javascript so as to amend the co-authors-plus.js script to utilize the appropriate avatar image.
Thoughts/Advice appreciated.
Thanks
Contributor guide
Research direction
Start by reading co-authors-plus.js and the author-box rendering path described in the issue, then investigate how WordPress, BuddyPress, or WP Avatar exposes the appropriate avatar URL. Done means the JavaScript author box uses the selected avatar source while retaining Gravatar as a fallback; the payload names no test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100