Topic: Limiting size of signature images

I wonder if it is possible to limit the size of user's signatures. I work with the MIT Scratch team, and we use a modified version of PunBB for our community forums. Lately, some members have taken to including gigantic 1/2 page images in their signatures. The images are hosted off site, but I wonder if there is a way to limit their size or perhaps reject images if they are too big.

Has anyone else had similar issues, or come up with a good way to address this problem?

Re: Limiting size of signature images

Hypothetical code:

CSS:

.signature img{
max-height: 300px;
}

JavaScript: (e.target part might not work, idk if that's how the onload event works)

var sigs = document.getElementsByClassName('signature');
for(i=0; i<sigs.length; i++)
{
  var tmp = sigs[i].getElementsByTagName('img');
  for(a=0; a<tmp.length; a++)
    tmp[a].onload = function(e){
      if(e.target.width > 300)
        e.target.style.height = '300px';
    }
}

PHP: (regex might not work)

function punbb_parse_signatures( ... )
{
  ...
  $signature = preg_replace('/<img([^\/]+)\/>/i', '<img onload="if(this.height>300)this.style.height=\'300px\';" $i/>', $signature);
  ...
}

Note: code not tested.

Re: Limiting size of signature images

Its a big problem of forum user. Sometime we can't able to post our favorite signature only for Big size.
Ashley Madison