Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can group avatar size be changed?


  • takuya
    Participant

    @takuya

    Do we also have functions to cutomize group avatar output size?

    <?php bp_group_avatar() ?>

    I’ve found the function to customize user avatars, but can’t find for the group avatar.

Viewing 11 replies - 1 through 11 (of 11 total)
  • No way of doing this via code. It probably ought to go on Trac as an enhancement suggestion.

    In the interim you can probably use CSS to “resize” the image after the page’s loaded, though, not knowing exactly what/where you want the image to appear different, I’m reluctant to suggest the CSS.


    byandreas
    Participant

    @byandreas

    did you figure this out?

    bp_group_avatar accepts the following args

    $defaults = array(
    ‘type’ => ‘full’,
    ‘width’ => false,
    ‘height’ => false,
    ‘class’ => ‘avatar’,
    ‘id’ => false,
    ‘alt’ => __( ‘Group avatar’, ‘buddypress’ )
    );


    byandreas
    Participant

    @byandreas

    Sorry, but… Could you explain that so a newbie could get it too? :) Where, What and How are questions that often pop into my head reading the forums…


    nathan12343
    Participant

    @nathan12343

    I’m not sure why this still isn’t possible – in the default theme the image seems to be hard coded to read 150×150 but there is plenty of space all around it. It would be great if anyone could tell me where I could change the dimensions. Stretching the image through css would probably look bad.

    Thanks


    modemlooper
    Moderator

    @modemlooper

    bp_group_avatar(‘type=full&width=75&height=75’)

    Change height and width.


    still giving
    Participant

    @nonegiven

    Hi. Which page are you guys actually doing this editing … groups/single/group-header.php?

    It would be better to have a separate long thin image rather than a square creating lots of white space around it.

    I tried changing it but it makes no difference. Removing the section at least removed the avatar.

    How does one change the size of, or even remove, the group avatar image?

    There is too much wasted space causing too much unnecessary scrolling down for users in default styles.


    Virtuali
    Participant

    @gunju2221

    @modemlooper, I do not think that CSS is defined in any of the CSS stylesheets.

    To edit avatar size, unfortunately, it will edit the size of avatars on all headers on your site with the avatar (members)

    go into your buddypress default.css and you will be able to edit it from there.


    sdls
    Member

    @simon_said

    I’m coming across the same barrier… Pulling the group image at different sizes is fine, however when you try and modify the group avatar size from the group admin perspective, it get’s a bit tricky. Try and upload and small icon for a group and you will notice it puts the little logo on a black background and resizes it akwardly.

    Looking for something to hook onto to modify this setting and I can’t see anything pertaining to size in the BP template set

    `

    <input type="submit" name="upload" id="upload" value="” />

    ‘delete_group_avatar’, ‘component’ => ‘groups’, ‘wrapper_id’ => ‘delete-group-avatar-button’, ‘link_class’ => ‘edit’, ‘link_href’ => bp_get_group_avatar_delete_link(), ‘link_title’ => __( ‘Delete Avatar’, ‘buddypress’ ), ‘link_text’ => __( ‘Delete Avatar’, ‘buddypress’ ) ) ); ?>

    <img src="” id=”avatar-to-crop” class=”avatar” alt=”” />

    <img src="” id=”avatar-crop-preview” class=”avatar” alt=”” />

    <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="” />

    <input type="hidden" name="image_src" id="image_src" value="” />

    `

    Any thoughts on how to modify size, right from the upload process?


    sdls
    Member

    @simon_said

    how bout these little dudes?… no idea what they do

    `

    `

    Really you could just resize the original thumbnails to 100px X 100px and allow BP to resize them, however you don’t also get the crispness you need when designing nice little icons.


    Steve
    Participant

    @steveatbluemarble

    Or, like @modernlooper pointed out three years ago, you could just edit the template with the avatar in question and change bp_group_avatar() to bp_group_avatar(‘type=full&width=100&height=100′)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Can group avatar size be changed?’ is closed to new replies.
Skip to toolbar