Potresti fare cosi:
nella pagina dove ti richiami le miniature:
codice:
[img]resize_foto.php?w=100&h=100&filename=<?=$file_foto?>[/img]
La pagina resize_foto.php ti crea l'immagine 100X100
codice:
<?php
// The file
$filename = $_GET['filename'];
// Set a maximum height and width
$width = $_GET['w'];
$height = $_GET['h'];
$exst=substr($filename,-3);
// Content type
//header('Content-type: image/jpeg');
// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);
if (($width_orig>$width) || ($height_orig>$height)){
if ($width && ($width_orig < $height_orig)) {
$width = ($height / $height_orig) * $width_orig;
} else {
$height = ($width / $width_orig) * $height_orig;
}
}else{
$width=$width_orig;
$height=$height_orig;
}
// Resample
$image_p = imagecreatetruecolor($width, $height);
if ($exst=="gif"){
$image = imagecreatefromgif($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
// Output
imagegif($image_p);
}else{
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
// Output
imagejpeg($image_p, null, 100);
}
?>
Spero ti possa essere utile.