Too big? Too small? This tutorial will show you how to change the size of your gravatar according to the dimensions of your liking.
There are two methods on how to change the gravatar size. Here, I will show you both ways.
First, go to your root directory and look for the /wp-includes folder.
Open the folder and look for comment-template.php.
Find this line:
$defaults = array('walker' => null, 'max_depth' => '', 'style' => 'ul', 'callback' => null, 'end-callback' => null, 'type' => 'all', 'page' => '', 'per_page' => '', 'avatar_size' => 64, 'reverse_top_level' => null, 'reverse_children' => '');
Change the value of ‘avatar_size’ to the size you want and you’re done.
This is the easier and less painful way.
Open your theme’s comments.php file
Look for this code:
<?php wp_list_comments(); ?>
Add ‘avatar_size=anynumber’ to the code. So it will look like this:
<?php wp_list_comments('avatar_size=40'); ?>
Save the file and you are done.