I made a simple PHP script to display a users avatar image they uploaded but I was wondering how can I improve the script below.
Is there something I can do to improve the load time on the users avatar images that are very big if so how can i add it to my code thanks.
Here is the code below.
<?php
list($width, $height) = getimagesize("images/pic.jpg");
if ($width >= 180){
$width = 180;
echo '<img src="images/pic.jpg" width="' .$width. '" />';
} else {
echo '<img src="images/pic.jpg" width="' .$width. '" height="' .height. '" />';
}
?>