Use both mimetypes and imghdr to make decision faster. Twitter will reject incorrect image anyway.