How can user change the own gravatar image from front end? for the back-end there are lot of plugins (like user photo etc.), by which user can easily change the gravatar image?

  • I think you mean avatar, not gravatar? – birgire Jan 20 '14 at 10:58
  • Please explain more precisely what you want to do. – Brad Dalton Jan 20 '14 at 11:29
  • i have created a custom form and i want that user can upload any picture from front-end and it will save on back-end and that image should be visible on profile page on back-end(yourdomain/wp-admin/profile.php) – Yogesh Jan 20 '14 at 11:41

They can change the image in their Gravatar account.

Or set a default from the backend which isn't what you asked originally

add_filter( 'avatar_defaults' , 'default_avatar' );

function default_avatar( $avatar_defaults ){

$new_avatar = get_stylesheet_directory_uri() . '/images/default-gravatar.png';

$avatar_defaults[$new_avatar] = "Gravatar";

return $avatar_defaults;

Source Replace default avatar

  • yes i know that, can we change the gravatar image pragmatically?Is their a wordpress function for this? – Yogesh Jan 20 '14 at 9:42
  • Its based on the email address. You want to change it from the front end? The only way is to change the image on the account or change the email address submitted. codex.wordpress.org/Using_Gravatars – Brad Dalton Jan 20 '14 at 10:39
  • yes i want to change it from front end, i am creating an user registration page on front-end from where user can change the gravatar image. – Yogesh Jan 20 '14 at 10:52
  • user can upload his custom image from front end and it should be saved as his gravatar image. – Yogesh Jan 20 '14 at 11:02
  • Not how Gravatar works as you upload the image from the front end of your Gravatar account. I think you're referring to allowing users to upload a Avatar image. – Brad Dalton Jan 20 '14 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.