Genesis Framework comes with built-in Author Box functionality that displays the post author Gravatar image and some info about him. If you’re designing a new Genesis child-theme or want to modify your current theme, you may want to change the Author box Gravatar image size. In that case, use this easy guide to know how to modify the size of Genesis Author box avatar size.
Change Genesis Author box Gravatar size
To change the size of the avatar image in the Author box you can use CSS by changing the width and height of the image. But this will not affect the size of the Gravatar image as it will be loaded from Gravatar at the same old size and the size of the avatar will be changed at the browser level only. This will affect the quality of the avatar image especially if you increased the size of Gravatar image.
To solve this issue you will need to load the image from Gravatar at the same size you want to display in the Genesis Author box.
Modifying Author box Gravatar size
To change the size of the Author box Gravatar add the following code to your Genesis child theme’s functions.php
file.
Don’t forget to take a backup before editing the file.
add_filter('genesis_author_box_gravatar_size', 'wpme_change_gravatar_size');
function wpme_change_gravatar_size($size) {
return '120';
}
Change the number of pixels 120
to the new Gravatar size. You may also need to change the size of the avatar image in your theme’s style.css
file.
If you have any question or want to add anything, feel free to use comments below.
Christina says
Thanks for this post! Do you know how I can add a custom image as the gravatar in my authorbox? I want to use a different image down there but keep my other gravatar one. So I can’t just change the gravatar at the source. I just want to chose which picture to show in the author box and it not be connected to my gravatar.
WP-ME.com says
Hey Christina,
You can use this plugin.