diff --git a/llama-index-core/llama_index/core/schema.py b/llama-index-core/llama_index/core/schema.py index 5b3c1d9302a3d..9ef8b58fe6c59 100644 --- a/llama-index-core/llama_index/core/schema.py +++ b/llama-index-core/llama_index/core/schema.py @@ -794,7 +794,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs["image_mimetype"] = ir.get("mimetype", None) mimetype = kwargs.get("image_mimetype") - if not mimetype and "image_path" in kwargs: + if not mimetype and kwargs.get("image_path") is not None: # guess mimetype from image_path extension = Path(kwargs["image_path"]).suffix.replace(".", "") if ftype := filetype.get_type(ext=extension):