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.
Method 1
Step 1
First, go to your root directory and look for the /wp-includes folder.
Step 2
Open the folder and look for comment-template.php.
Step 3
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' => '');
Step 4
Change the value of ‘avatar_size’ to the size you want and you’re done.
Method 2
This is the easier and less painful way.
Step 1
Open your theme’s comments.php file
Step 2
Look for this code:
<?php wp_list_comments(); ?>
Step 3
Add ‘avatar_size=anynumber’ to the code. So it will look like this:
<?php wp_list_comments('avatar_size=40'); ?>
Step 4
Save the file and you are done.