This will fail with some files with bad EXIF tags. Pilkit catch several exceptions (https://github.com/matthewwithanm/pilkit/blob/master/pilkit/processors/base.py#L161) and I had also one case with an IOError (https://github.com/saimn/sigal/blob/master/sigal/image.py#L47).