def thumbnail(self):
        """Identifies top image, trims out a thumbnail and also has a url
        """
        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 __HOLE__ as e:
                    if 'interlaced' in e.message:
                        return None
                return image, image_url
        return None, None
dataset/ETHPy150Open codelucas/newspaper/newspaper/images.py/Scraper.thumbnail