'Yields the MIME-type of the document at the URL, or None.
MIME is more reliable than simply checking the document extension.
You can then do: URL.mimetype in MIMETYPE_IMAGE.'

@property
def mimetype(self, timeout=10):

    try:
        return self.headers['content-type'].split(';')[0]
    except KeyError:
        return None
