Skip to:

Change Gravatar Size?

  • citizenkeith


    I’ve installed at my test site. Gravatars show in the user profile at their true size of 80×80. However, in the kakumei theme, they are displayed at 48×48. I can’t find where this can be changed. I looked in the CSS and in the post.php file.

    Am I blind?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Here is what a quick grep came up with:

    bb-includes/template-functions.php:function post_author_avatar( $size = ’48’, $default = ”, $post_id = 0 ) {



    Thanks Wyvn. It would be nice if there was something in the Admin menu to change this, but for now I’ll just change that file. :)

    Well, if you like to hack you admin files, you can add the following code to the options-general.php file just after line 143, making this code start on line 144;

    <label for="avatars_size">
    <?php _e('Gravatar Size:'); ?>
    <select name="avatars_size" id="avatars_size">
    $selected = array();
    $selected[bb_get_option('avatars_size')] = ' selected="selected"';
    <option value="16"<?php echo $selected[16]; ?>><?php _e('16 px'); ?></option>
    <option value="32"<?php echo $selected['32']; ?>><?php _e('32 px'); ?></option>
    <option value="36"<?php echo $selected['36']; ?>><?php _e('36 px'); ?></option>
    <option value="48"<?php echo $selected['48']; ?>><?php _e('48 px'); ?></option>
    <option value="80"<?php echo $selected['80']; ?>><?php _e('80 px'); ?></option>

    And in the bb-includes/template-functions.php file, after line 1198 you can add this;

    $size = bb_get_option('avatars_size');

    Then you can change the size in the admin section, and the correct size will show with the posts.

    Or you can download the edited files here




    Thanks Rune. I actually don’t like to hack admin files… Wyvn’s suggestion did the trick. I just made note of the change so I can do it again when I upgrade next.

    Maybe you can submit that for a future version of bbPress. :-)

    Any chance on updating this info for 1.0.2? Sounds like a nice work-around.

    In the mean time you can just pass the size via the avatar call…

    <?php post_author_avatar_link($size='100'); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar