ok ho risolto, se a qualcuno può interessare posto qua i pezzi di script che servono 
nel file php che deve visualizzare:
Codice PHP:
$filename="$path/$nomefile";
$larghezzamassima=640;
$altezzamassima=480;
echo"<img src=\"imgresize.php?maxx=$larghezzamassima&maxy=$altezzamassima&src=$filename\">";
e poi basta creare il file imageresize.php (che, con molta fantasia, si occupa di fare il resize "al volo" dell'immagine e restituirla al vostro script principale che la visualizza):
Codice PHP:
<?php
$maxx = $_GET["maxx"];
$maxy = $_GET["maxy"];
$source_image_URL = $_GET["src"];
$source_image = imagecreatefromjpeg($source_image_URL);
list($width, $height) = getimagesize($source_image_URL);
$percent1 = $width / $maxx;
$percent2 = $height / $maxy;
$percent = max($percent1,$percent2);
$new_eight = round($height /$percent);
$new_width = round($width /$percent);
$dest_image = imagecreatetruecolor($new_width, $new_eight);
imagecopyresampled ($dest_image, $source_image, 0, 0, 0, 0, $new_width, $new_eight, $width, $height);
header("Content-type: image/jpeg");
imagejpeg($dest_image);
imagedestroy($dest_image);
imagedestroy($source_image);
?>