ammesso che i percorsi siano giusti (perche' non usi sempre $percorso_small?)Codice PHP:
<?php
header('Content-type: image/jpeg');
/* bla bla il resto dello script, basta che non abbia output */
list($width, $height) = getimagesize($percorso_small);
$thumb = imagecreatetruecolor(640, 480);
$source = imagecreatefromjpeg("../public/immagini/small/".$coda."/file.jpg"));
imagecopyresampled($thumb, $source, 0, 0, 0, 0, 640, 480, $width, $height);
imagejpeg($thumb);
?>