'Identifies top image, trims out a thumbnail and also has a url'

def thumbnail(self):

    image_url = self.largest_image_url()
    if image_url:
        (content_type, image_str) = fetch_url(image_url, referer=self.url)
        if image_str:
            image = str_to_image(image_str)
            try:
                image = prepare_image(image)
            except IOError as e:
                if ('interlaced' in e.message):
                    return None
            return (image, image_url)
    return (None, None)
