1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Change avatar max widt

Discussion in 'Styling and Customization Questions' started by Shousan, Jan 29, 2014.

  1. Shousan

    Shousan New Member

    Hello,

    I have searched through the forums to find something that would increase the max width and height of my avatars to 150x250. I found one code which told me to add width: 150px; height: 250px in the xenforo css under the avatar img code. This however stretches out any image (regardless of the size) to 150x250px. When I use max-width and max-height instead, nothing changes. Could somebody please tell me how to change the max width and height to 150x250? There is a follow up question that is attached to this in case the previous question gets solved. Is it possible to allow certain members to use 150x300 avatars (when the max is set on 150x250), because I wish to allow contributors to use larger avatars.

    Regards,

    Shou
     
  2. mistypants

    mistypants Well-Known Member

    This guide will help you adjusting the avatar space's size, you'll just have to edit the values to what you'd like.

    To allow for avatars larger than 192px (which is the largest size XenForo stores them), you'll have to do a file edit. Open library/XenForo/Model/Avatar.php and find:
    Code:
    'l' => 192,
    Change the 192 to the largest value you'd like to store avatars (from what you've said, 300px), like so:
    Code:
    'l' => 300,
    As for having it usergroup based, I haven't been able to figure that out myself. Maybe someone else can help with that part.
     
    Amaury likes this.

Share This Page