docs: def has_image(self, digest, mime_type, index, size=500):
          """Tell if there is a preview image."""
          cache_key = f"img:{index}:{size}:{digest}"
          return mime_type.startswith("image/") or cache_key in self.cache