GD kütüphanesi kullanarak çok basit birşekilde Thumbnail oluşturma fonksiyonu.function picture($off_site,$savethumb,$gen) {$fp = fopen($off_site, ‘rb’) or die($off_site.’ konumunda dosya açılamadı.’);$buf = ”;while(!feof($fp)){$buf .= fgets($fp, 4096);}fclose($fp);$data = $buf;//yeni boyutlandırma$size = $gen;$src = imagecreatefromstring($data);$width = imagesx($src);$height = imagesy($src);$aspect_ratio = $width/$height;//ölçeklendirmeif($width <= $size){$new_w = $width;$new_h = $height;}else{$new_w = $size;$new_h = abs($new_w / $aspect_ratio);}$img = imagecreatetruecolor($new_w,$new_h);//çıktıimagecopyresampled($img,$src,0,0,0,0,$new_w,$new_h,$width,$height);// header//if(empty($savethumb)) header('Content-Type: image/jpeg');// ya da kaydedinimagejpeg($img, $savethumb, 90);imagedestroy($img);}