Skip to main content
This covers how to load images into a document format that we can use downstream with other LangChain modules. It uses Unstructured to handle a wide variety of image formats, such as .jpg and .png. Please see Unstructured for more instructions on setting up Unstructured locally, including setting up required system dependencies.

Using unstructured

Retain elements

Under the hood, Unstructured creates different “elements” for different chunks of text. By default we combine those together, but you can keep that separation by specifying mode="elements".