XF 1.2 Resize Placeholder Avatar

I'm trying to find a way of changing the placeholder avatar.

At the moment the code is like this:
<img src="styles/default/xenforo/avatars/avatar_m.png" width="96" height="96" alt="member" />
I want to remove the line altogether, add a display: none, or change it to
<img src="styles/default/xenforo/avatars/avatar_m.png" width="1" height="1" alt="member" />
I don't want to change custom avatars that members have loaded.

Stuck as always. Where should I be looking?


Well-known member
I would not just remove it or display:none it nor would I make it a 1px by 1px thing...it will end up looking like this.
In any case the template you are looking for is message_user_info

So if a user has not chose an avatar what are you trying to display other than the default avatar?
That's what I am trying to achieve. If the member hasn't loaded an avatar I would prefer the avatar space to collapse.

The template allows me to remove ALL avatars, but does not allow me just to remove the placeholder ones.
Got it. After several hours. Thanks to everyone in the big and tall avatars thread

In message_user_info template change "m" to "l" to get rid of the html controls making avatars 96px square.
 <xen:avatar user="$user" size="l" img="true"  />
I've gone for 80px width and whatever height the avatar is which gets rid of a lot of the blurred avatar look from vB imports..

In extras.css template I copied from the thread linked at the top
.thread_view .messageList .messageUserInfo a.avatar img,
.thread_view .quickReply .messageUserInfo a.avatar img,
.conversation_view .messageList .messageUserInfo a.avatar img,
.conversation_view .quickReply .messageUserInfo a.avatar img,
.avatar img, .avatar .img, .avatarCropper
    max-width: 80px;
    height: auto;
In message_user_info.css template change from fixed sizes for mobile view.
        .Responsive .messageUserBlock div.avatarHolder .avatar img
            width: 80px;
            height: auto;
Finally in the folder styles/yourstyle/xenforo/avatars replace the images with a 100px * 1px .png image which now allows the avatar box to collapse if there is no avatar.

Some further fiddling with .css templates could make it look like there were never any placeholder avatars and reduce wasted space when viewing threads. I've got this:


Beware there are knock-on effects. Adding avatars is tricky as users would then be required to click on a 1px background coloured image. More template mods needed.
Last edited: