Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

DeepsetSourceToBase64Image

Convert file sources directly to base64-encoded images.

Deprecation Notice

This component is deprecated. It will continue to work in your existing pipelines for now.

Key Features​

  • Converts file sources (such as image files) directly to base64-encoded Base64Image objects.
  • Configurable detail level (auto, low, or high) for image processing.
  • Used in visual question answering pipelines to prepare images for vision-capable generators.

Configuration​

  1. Drag the DeepsetSourceToBase64Image component onto the canvas from the Component Library.
  2. Click on the component to open the configuration panel.
  3. On the General tab, configure the Detail level: auto (default), low, or high.
  4. Go to the Advanced tab to configure additional settings.

Connections​

DeepsetSourceToBase64Image receives file sources through its input and outputs a list of Base64Image objects. You typically connect its output to a vision-capable Generator or to Base64ImageJoiner when combining images from multiple sources.

Usage Examples​

Basic Configuration​

DeepsetSourceToBase64Image:
type: deepset_cloud_custom_nodes.converters.file_to_image.DeepsetSourceToBase64Image
init_parameters: {}

Using the Component in a Pipeline​

This example converts uploaded image files to base64 for a vision pipeline:

# haystack-pipeline
components:
source_to_image:
type: deepset_cloud_custom_nodes.converters.file_to_image.DeepsetSourceToBase64Image
init_parameters:
detail: auto

inputs:
sources:
- source_to_image.sources

outputs:
base64_images: source_to_image.base64_images

max_runs_per_component: 100

metadata: {}

Parameters​

Inputs​

ParameterTypeDescription
sourcesList[Union[str, Path, ByteStream]]A list of file sources to convert to base64-encoded images.

Outputs​

ParameterTypeDescription
base64_imagesList[Base64Image]A list of base64-encoded images.

Init Parameters​

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
detailLiteral['auto', 'low', 'high']autoControls how the model processes the image and generates its textual understanding. Choose high for best results and low for lowest inference costs.

Run Method Parameters​

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.

ParameterTypeDefaultDescription
sourcesList[Union[str, Path, ByteStream]]A list of file sources to convert to base64-encoded images.