-1

How can i get the height and width of an image?

As example i have this link here:

Image

how can i get the size of the image with PHP?

Name
  • 564
  • 1
  • 8
  • 18
  • 1
    possible duplicate of [Get Image Height and Width as integer values?](http://stackoverflow.com/questions/2179100/get-image-height-and-width-as-integer-values) – Blaatpraat May 12 '15 at 13:07
  • see `getimagesize` function. – pavel May 12 '15 at 13:07
  • this will help http://php.net/manual/en/function.getimagesize.php – Sachink May 12 '15 at 13:08
  • possible duplicate of [Is there an easy way to "get" an image's size in PHP without javascript?](http://stackoverflow.com/questions/2137217/is-there-an-easy-way-to-get-an-images-size-in-php-without-javascript) – Bruno Belotti May 12 '15 at 13:11

2 Answers2

2
list($width, $height) = getimagesize('path');
Sachink
  • 1,425
  • 10
  • 22
2
This is to find height and width of an image.

list($width, $height, $type, $attr) = getimagesize("image_name.jpg");
echo "Image width " .$width;
echo "<BR>";
echo "Image height " .$height;
Raju
  • 185
  • 1
  • 11