Forums

Join
bbPress Support ForumsTroubleshootingChange width and height of gravatars

Info

Change width and height of gravatars

  1. Hi,

    with 1.0 and kakumei, how to change the width and height of the gravatars in posts and profiles?

    ++

  2. This can be changed in the templates just look for these functions in your templates and set $size to the integer you would like:

    post_author_avatar($size)
    post_author_avatar_link($size)
    bb_get_avatar( $user->ID, $size )
  3. Hi,
    I couldn't find this anywhere in the code, do you know which file exactly?

    I did search within folder via Dreamweaver.

    I really would love to have a fixed size for avatar

  4. Or do you mean I have to change this code:
    <?php post_author_avatar_link(); ?>

    Into:
    <?php post_author_avatar_link($size:width=80px; height=80px;); ?>

    I don't know exactly how to do that

  5. Okay here's what I did:

    I changed:
    <?php avatarupload_display(get_post_author_id()); ?>

    Into:
    <?php avatarupload_display(get_post_author_id($size=80)); ?>

    In my post.php (in bb-templates/templatename/)

    But since it had only mine avatar with that size, all avatar from other members are showing mine avatar.

    I don't know where to fix that.

  6. Ok, sorry to post again, I found a solution via css, I know it's not the best solution :( but it works I guess.

    I did this:

    img.avatar { border: medium none; width:80px; height:80px; }

  7. Hey there!

    I found a solution by checking out how to tweak the avatar size for standard Gravatars in WordPress and then applied it to the BBPress code like so:

    <?php post_author_avatar_link('avatar_size=100'); ?>

    I know it's 2 years ago someone posted, but I figured it might be useful to somebody :)

  8. You must log in to post.