Remove redundant lower().
Comment why need doing something specific with 'bmp'.
Catch PIL/Pillow IOError.
Refactor utils.image_mimetype
Refactor utils.parse_render