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
I've also encountered this problem using exif_get_data. I can handle images on my localhost (PHP v5.4.15) but on my web host (PHP v5.6.22) the error 'illegal IFD size' even though I'd tried the "@" ignore warning method. I found that on the web host (whether because of different version or installation), exif_get_data was actually throwing an exception rather than issuing a warning. I'm using the exif data to reorientate the picture if it's been rotated, so if the exif data is faulty or not present I just ignore it and do nothing, here's the code snippet:
try {
$exif = exif_read_data($filePath);
}
catch (Exception $exp) {
$exif = false;
}
if ($exif){
...
}