Gravatar is used to display the user profile images in WordPress. It is the most popular medium to show a profile picture to identify oneself. Without a gravatar, WordPress uses a default image called ‘Mystery Person’.
The gravatar image will appear many times in the comment section of your post and other section by default lots of people doesn’t have their own gravatar image associated with their email address. You also can replace the default image with your own images.
To make it happen, first of all, upload the image you want to use as your gravatar image in the image library. You will have URL in the right panel, then copy the image URL.
Next, you have to add some custom code in the ‘function.php’. The following custom code is given below which has to include.
Be mindful to replace the $myavatar value with the URL of the custom gravatar image you just have uploaded. Now, you have to visit Settings >> Discussion option and you will see that your custom avatar has added as a default avatar choice.