BuddyDev

Search

Avatar image size issue

  • Participant
    Level: Enlightened
    Posts: 22
    Chetan Sonar on #19154

    Hi,

    I have below issue:

    The avatar size in comments section is too big, I would like to reduce it. For Profile pic it is fine.

    check this screenshot:
    https://prnt.sc/lpaokv

    I have checked your below posts :
    https://buddydev.com/changing-default-avatar-size-croppedused-by-buddypress/
    https://buddydev.com/limit-buddypress-user-group-avatar-file-size/

    Unfortunately I don’t have bp-custom.php file in wp-content/plugins directory.

    ———–
    [root@server1 buddypress]# locate bp-custom.php
    /home/apprend/public_html/wp-content/themes/wplms/includes/bp-custom.php
    [root@server1 buddypress]#
    ————

    I tried adding recommended text in this file but not worked. Then I searched for functions.php file. Check below :

    ———–
    [root@server1 buddypress]# locate functions.php | grep buddypress
    /home/apprend/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-activity/bp-activity-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-blogs/bp-blogs-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-core/bp-core-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-core/admin/bp-core-admin-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-friends/bp-friends-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-groups/bp-groups-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-members/bp-members-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-messages/bp-messages-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-notifications/bp-notifications-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-settings/bp-settings-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/buddypress-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/activity/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/blogs/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/groups/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/members/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/messages/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/notifications/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-templates/bp-nouveau/includes/xprofile/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress-followers/_inc/bp-follow-functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress-global-search/includes/functions.php
    /home/apprend/public_html/wp-content/plugins/buddypress-member-types-pro/core/bpmtp-functions.php
    /home/apprend/public_html/wp-content/plugins/mediapress/modules/buddypress/activity/mpp-activity-functions.php
    /home/apprend/public_html/wp-content/plugins/mediapress/modules/buddypress/groups/mpp-bp-groups-functions.php
    /home/apprend/public_html/wp-content/plugins/mediapress/modules/buddypress/notifications/mpp-notifications-functions.php
    —————-

    I got confused so I searched for “BP_AVATAR_THUMB_WIDTH” contents:

    —————-
    [root@server1 buddypress]# find . -type f -exec grep -l “BP_AVATAR_THUMB_WIDTH” {} \;
    ./bp-core/bp-core-avatars.php
    ./bp-templates/bp-legacy/buddypress/activity/entry.php
    ./bp-themes/bp-default/activity/entry.php
    —————–

    I have made the changes in “bp-core-avatars.php” file from 150 to 50 but nothing worked.

    Regards,
    Matt

  • Keymaster
    (BuddyDev Team)
    Posts: 21769
    Brajesh Singh on #19161

    Hi Matt,

    1. Please avoid changing in BuddyPress files directly. I will suggest reverting back.

    2. You can create a php file(make sure you have the starting tag there) and put it in wp-content/plugins/bp-custom.php

    3. The change are only visible on new uploads.

    4. And for the screenshot, The simple fix is using css.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 22
    Chetan Sonar on #19170

    Hi,

    I have used bp-custom.php and it reduces the size of the avatar. Thanks.

    Please check below screenshots:

    https://prnt.sc/lpoe12
    http://prntscr.com/lpogag

    The problem is, there are 3 sections:

    section 1: Profile Image (uses BP_AVATAR_FULL defined sizes)
    section 2: Post an Update (uses BP_AVATAR_FULL defined sizes)
    section 3: Comments (uses BP_AVATAR_THUMB defined sizes)

    Buddypress uses same sizes to section 1 and section 2 which is not good. I would like to uses same sizes to section 1 and section 2. How can I do that? I don’t want to reduce section 1 image.

    I hope, I managed to explain well.

    Thanks.

  • Keymaster
    (BuddyDev Team)
    Posts: 21769
    Brajesh Singh on #19184

    Please use css to fix it. I am sorry, but there is nothing much that I can suggest here.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved