php-initial-avatar-generator
php-initial-avatar-generator copied to clipboard
Wordpress Plugin
Hi There,
Would you be interested in turning this into a Wordpress Plugin for generating a custom default avatar for comments? I would be very keen to use something like that. The idea would be to use their gravatar
by default, but if they didn't have one, then fall back to this library to generate an image with their initials and a random color. You've done all the hard work so turning into a plugin would be pretty straightforward.
Cheers Abe
Hi!
Could be quite cool! Absolutely. Where are these avatars be displayed? Iām not much into Wordpress š¬
Cheers
Would you happen to have any idea how to modify profile pictures with code in Wordpress?
So the best way to do it would be to use a filter on the get_avatar()
function. More info can be found here:
https://codex.wordpress.org/Plugin_API/Filter_Reference/get_avatar
This plugin does something similar, but not as well. https://github.com/Dev49net/wp-first-letter-avatar
Great, seems pretty straightforward! I will setup a plugin very soon š
I will be creating a tiny web API for this package first (it's ready, I just need to publish it), which can also act as an optional fallback for Wordpress users using a hosting provider that does not support required extensions.
API: https://github.com/LasseRafn/ui-avatars Plugin source coming here: https://github.com/LasseRafn/wordpress-initials-avatar
š
I've submitted a v0.5 for review at Wordpress š
This one will use the public api that I released recently, but I am already working on one that generates the avatars on-server. I just had some issues with generating a url for the avatar when using on-server.