Jak zrobić, że wyświetlało tylko .jpg ?
<?php /* To jest poprawna metoda */ } } ?>
I jak dynamicznie stworzyc miniatury ?
Podpowiedzcie chociaz nazwe funkcji

<?php /* To jest poprawna metoda */ } } ?>
<?php function skaluj($imageFile, $type, $maxImageWidth, $maxImageHeight, $newImageName, $imageQuality) { if($type == 'image/jpg' || $type == 'image/jpeg') $imageData = imagecreatefromjpeg($imageFile); else if($type == 'image/gif') $imageData = imagecreatefromgif($imageFile); else if($type == 'image/png') $imageData = imagecreatefrompng($imageFile); //$imageData = imagecreatefromjpeg($imageFile); $imageRatioWidth = $imageWidth > $maxImageWidth ? $maxImageWidth / $imageWidth : 1; $imageRatioHeight = $imageHeight * $imageRatioWidth > $maxImageHeight ? $maxInameHeight / $imageHeight : 1; $newImage = imagecreatetruecolor($newImageSizeWidth, $newImageSizeHeight); imagecopyresampled($newImage, $imageData, 0, 0, 0, 0, $newImageSizeWidth, $newImageSizeHeight, $imageWidth, $imageHeight); $savePath = $newImageName; imagejpeg($newImage, $savePath, $imageQuality); //imagedestroy($imageData); } ?>