Happy Christmas Holiday! Get Special Discounts

Adding Custom Default Gravatar

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.


If you haven’t subscribed to our YouTube channel, do subscribe to get WordPress-related tips and tricks. Also, follow us on Twitter and Facebook.

Sazzadul Bari

Hi, this is Sazzadul Bari, Digital Marketing Strategist at WPManageNinja. SEO content writing, outreaching, link building, and lead generation are my specializations. And when I am not drooling over WordPress plugins and updates, you'll find me enjoying sports or going through my favorite books.

Leave a Reply