diff --git a/langfun/core/modalities/image.py b/langfun/core/modalities/image.py
index 6583633..083f602 100644
--- a/langfun/core/modalities/image.py
+++ b/langfun/core/modalities/image.py
@@ -34,7 +34,7 @@ def mime_type(self) -> str:
return f'image/{self.image_format}'
def _repr_html_(self) -> str:
- if self.uri:
+ if self.uri and self.uri.lower().startswith(('http:', 'https:', 'ftp:')):
return f''
image_raw = base64.b64encode(self.to_bytes()).decode()
return f''