Syntax :

getimagesize(“image_name”);

Penggunaan :

$info = getimagesize(“my-great-photo.jpg”);

Mendapatkan width : echo  $info[0];


Berikut value yang disimpan di dalam array :

Array (

[0] => 300

[1] => 200

[2] => 2

[3] => width=”300″height=”200″

[bits] => 8

[channels] => 3

[mime] => image/jpeg

)

Sumber : http://www.electrictoolbox.com/php-get-image-size/