getimagesize()
function is used to get the size of an image in PHP. This function takes the path of file with name as an argument and returns the dimensions of an image with the file type and height/width. array getimagesize( $filename, $image_info )