Class Introduction
Function
Inherits langchain_core.document_loaders.base.BaseLoader to parse JPG and PNG images with resolution less than 4096 × 4096.
Prototype
from mx_rag.document.loader import ImageLoader ImageLoader(file_path)
Parameters
Parameter |
Data Type |
Required/Optional |
Description |
|---|---|---|---|
file_path |
String |
Required |
File path of images. The path length range is [1, 1024]. The document path cannot be a soft link and cannot contain two consecutive dots (..). The image file size must be less than 16 MB. |
Example
from mx_rag.document.loader import ImageLoader
loader = ImageLoader("test.png")
docs= loader.lazy_load()
print(list(docs))
Parent topic: ImageLoader