How it works
- Attach images to spans using SDK methods or structured output data
- Images are uploaded during span ingestion (image data is stripped from the span and stored separately)
- Judges fetch images when evaluating the span and send them to a vision-capable LLM
- Evaluation results appear in the dashboard like any other judge evaluation
Attaching images to spans
There are two ways to attach images to spans, depending on your workflow.Option 1: SDK helper methods
The SDK providesadd_screenshot() and add_image() methods for attaching images with metadata.
Screenshots with viewport context
For browser agents or responsive testing, use add_screenshot() to capture different viewports:
add_image():
Option 2: Image URLs (S3 presigned or CDN)
If your images are already hosted externally, you can pass an HTTPS URL instead of base64 data. ZeroEval will download the image, validate it, and copy it into its own storage. Attach URLs viaattributes.attachments using a url key instead of base64:
Presigned S3 URL
The URL only needs to stay valid long enough for ZeroEval to download the image during ingestion (typically a few seconds). After that, ZeroEval serves the image from its own storage. CDN URLs must be from a trusted domain configured in the backend.
Option 3: Structured output_data
If your workflow already produces screenshot data as structured output (common with browser automation agents), you can include images directly in the span’soutput_data. ZeroEval automatically detects and extracts images from JSON arrays containing base64 or url fields.
output_data by replacing the base64 key with url:
- Extracts each object with a
base64orurlfield as an attachment - Downloads (for URLs) and uploads the images to storage
- Strips the image data from
output_datato keep the database lean - Preserves the metadata (viewport, width, height) for display
All methods produce the same result: images stored and available for multimodal judge evaluation. Choose whichever fits your workflow better.
Creating a multimodal judge
Multimodal judges work like regular judges, but with criteria that reference attached images. The judge prompt should describe what to look for in the visual content.Example: UI consistency judge
Example: Brand compliance judge
Example: Accessibility judge
Filtering spans for multimodal evaluation
Use tags to identify which spans should be evaluated by your multimodal judge:Supported image formats
- JPEG
- PNG
- WebP
- GIF
Viewing images in the dashboard
Screenshots appear in two places:- Span details view - Images show in the Data tab with viewport labels and dimensions
- Judge evaluation modal - When reviewing an evaluation, you’ll see the images the judge analyzed
Model support
Multimodal evaluation currently uses Gemini models, which support image inputs. When you create a judge, ZeroEval automatically handles the image formatting for the model.Multimodal evaluation works best with specific, measurable criteria. Vague prompts like “does this look good?” will produce inconsistent results. Be explicit about what visual properties to check.