bolt / thumbs

Thumbnail handler for Bolt Images
12 stars 16 forks source link

No valid exif data in image breaks image output #13

Closed rixbeck closed 9 years ago

rixbeck commented 9 years ago

JPG images are not necessary contains valid exif data. Image attached below is simply saved from Photoshop with no metadata. Uploading it up in Bolt causes no preview because a E_WARNING message exception:

Whoops\Exception\ErrorException thrown with message "exif_read_data(mario.jpg): Incorrect APP1 Exif Identifier Code"

Stacktrace:
#13 Whoops\Exception\ErrorException in /home/rix/bolt.d64/brke/brke-web/vendor/bolt/thumbs/src/ThumbnailCreator.php:179
#12 Whoops\Run:handleError in <#unknown>:0
#11 exif_read_data in /home/rix/bolt.d64/brke/brke-web/vendor/bolt/thumbs/src/ThumbnailCreator.php:179
#10 Bolt\Thumbs\ThumbnailCreator:doResize in /home/rix/bolt.d64/brke/brke-web/vendor/bolt/thumbs/src/ThumbnailCreator.php:123
...

I'm not sure it is the best practice to suppress error output by '@' like in this PR. Image with the issue can be reproduced: https://www.dropbox.com/s/8xhn976vzizc500/mario.jpg?dl=0