Pretty simple with Composer, run:
composer require gpslab/image-meta
$path = ''; // path to image
$analyzer = new ImageMetaAnalyzer();
$data = $analyzer->analyze($path);
// access from getters
echo $data->width();
echo $data->height();
echo $data->mime();
// access as array
$array = $data->toArray();
echo $array['width'];
echo $array['height'];
echo $array['mime'];
This bundle is under the MIT license. See the complete license in the file: LICENSE