I\'m working on an application where I fix orientation (if it is present) of jpeg files downloaded from an AWS bucket.
Here you can verify that this image has exif Rotat
you can catch an error with set_error_handler
set_error_handler
set_error_handler(function() { throw new Exception(); }, E_WARNING); try{ $exifData = exif_read_data($filePath); } catch (Exception $e) { $exifData = false; } finally { restore_error_handler(); } if(!$exifData) { // do something }