0

I'm uploading images on my ftp server in folder "uploads" to display them in a gallery. I want all of the images to have the same size, here's my php upload+display code, how do I do this?

$dir = "uploads/";

$images = scandir($dir);

$ignore = Array(" . ", " . . ");

foreach ($images as $img)

if (!in_array($img, $ignore))
{
    $fp = $dir . $img;
    echo "<img class='galleryimg' src='$fp' />";
}
Darek Kay
  • 15,827
  • 7
  • 64
  • 61
Susan
  • 11
  • 1
  • 2
    See documentation and examples for [ImageMagick](http://php.net/manual/en/imagick.resizeimage.php) - lots of complete functions there. – wrightee May 19 '15 at 10:50
  • possible duplicate of [how do i use imagick in php? (resize & crop)](http://stackoverflow.com/questions/18312243/how-do-i-use-imagick-in-php-resize-crop) – sitilge May 19 '15 at 11:01
  • If ImageMagick is not available on your host, try the GD library.. – jossif May 19 '15 at 11:04

0 Answers0