Theme editor

Guide XenForo Changing XenForo Postbit Avatar Size

Kreathex

I love this place!
Corporate User
Thread owner
Hello,

To update the avatar size and make it square in XenForo postbit:

First, go to Appearance & Languages > Templates > extra.less and open the template.
Then add the following code at the bottom:
(This code will make your rounded avatar a slightly curved square shape.)
(If you set the 5px value to 0, it will become a perfect square with no rounded corners. You can increase it if you prefer.)

Code:
.avatar.avatar--l,
.avatar.avatar--m,
.avatar.avatar--s,
.avatar.avatar--xxs,
.avatar.avatar--xs {
    border-radius: 5px !important;
}

Then, again go to Appearance & Languages > Templates > message_macros and open the template.

Find this code:

Code:
<xf:avatar user="$user" size="m"

Add the letter L to the part where the letter L is, then save the changes.
Your avatar size will increase without any distortion.
 
Back
Top