MyBB Community Forums

Full Version: Auto resize signature images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to auto resize signature images ?
Yes. I did this by editing two things.

First you want to edit your template
Post Bit Templates > postbit_signature
If it is default replace the code that is in there with
<div class="signature">
{$post['signature']}
</div>

Then you want to find your global.css file (Upload>cache>themes>you theme name)and add in the code

.signature img {max-width:600px; max-height:150px; overflow:hidden;}

.signature {border-top: 1px solid #aaaaaa; width:100%; margin-top:1em; padding-top:0.2em; max-height:400px; overflow:hidden;}

Note: you can change the number of pixels in max-width and max-height to whatever you want and the second line adds a nice grey line above the signature instead of the horizontal rule which you would have taken out if you replaced the postbit_signature with my code.
Test:
[Image: key_art_world_news.jpg]