MyBB Community Forums

Full Version: Auto Avatar Size
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
By: AoRGuN
What's it: Auto avatar size for postbit Toungue

AdminCP >>> Templates >>> Edit/Delete >>> Your Theme >>> Expand >>> PostBit Templates >>> postbit_avatar
Find:
alt="{$avatar_width_height}"
Replace:
alt="width="150" height="150""

NOTE: You Change it:
150
Enjoy
I'm going to try this... Thanks for sharing.
beautiful speciality , very thank aorgun
This is probably the easiest, but the poorest solution to avatar resizing. It'll stretch avatars smaller than 150x150 and make avatars larger than 150x150 smaller which will make it worse. It also means users can upload huge avatars and would take a long amount of time to load even when they're being downsized to a very small picture.
I tend to set the max height for oversized avatars (I don't think you can really prevent people from using avatars with large filesize if they use the avatar URL feature).

Something like:
<div style="max-height: 150px; max-width: 150px">{avatar variable here}</div>
Probably would be better if it grabbed the max width and height from the settings Smile