<div align="center"> <img src="$filename" onload="if(this.width > 450) {this.width=450;}" /> </img> </div>