however, the filesizes come up quite large. here's an example:

I have seen images that size made with GD at 5-6kb and mine ar all about 25-30kb, this slows down loading time considerable.
anyone know what I could do to fix this?
here's my script:
$imageInfo = getimagesize($filename);
$old_w = $imageInfo['0'];
$old_h = $imageInfo['1'];
if ($old_w>=$old_h)
{
$width=$size;
$height = ($width/$old_w)*$old_h;
}
else
{
$height=$size;
$width = ($height/$old_h)*$old_w;
}
$img_src ="$filename";
$dst_img=ImageCreateTrueColor($width,$height);
$src_img=ImageCreateFromJpeg("$filename");
imagecopyresampled($dst_img,$src_img,0,0,0,0,$width,$height,$old_w,$old_h);
$new_filename = md5($counted.mktime());
$location = "";
ImageJpeg($dst_img, $location, 100);
thanks in advance.