> Documentation index for agents: https://docs.rocketride.ai/llms.txt

# thumbnail

A RocketRide image filter that turns an existing image or Image document into a
compact 128×128 PNG thumbnail. Choose it when downstream preview, storage, or
vision work needs a fixed-size image rather than the source resolution.

## About Pillow

Pillow is a Python imaging library. This node uses the shared Pillow-based image
helper to decode input images, resize them, crop a thumbnail, and encode PNG
output.

## What it does

The node accepts raw images on the `image` lane and Image documents on the
`documents` lane, then produces thumbnail versions for the lanes declared by the
pipeline. It is a pure transform with no configuration or agent-tool surface.
Use it after an image is already available and you need a compact, consistently
sized derivative; it does not select frames or acquire images from another
source.

## Lanes

| Lane in | Lane out | Description |
| --- | --- | --- |
| `image` | `documents` | Emit the thumbnail as an Image document. |
| `image` | `image` | Emit the thumbnail as a raw PNG image stream. |
| `documents` | `documents` | Replace each supported Image document with its thumbnail. |

## Configuration

This node has no configuration fields. Its output size is fixed by the
implementation, so connect the input and only attach the output lane or lanes
your pipeline needs.

## Notes

### Thumbnail output

The shared image helper works on a copy, progressively reduces very large
images, preserves aspect ratio during its resize step, then center-crops the
result to exactly 128×128 pixels. Both raw-image and document paths encode the
result as PNG; the raw-image output therefore announces `image/png` even if the
input used a different MIME type.

### Raw image streams

The `image` lane buffers the input from `BEGIN` through `WRITE` and processes
it at `END`. If `documents` is connected, it emits one base64-encoded `Image`
document with new thumbnail metadata and preserved source provenance. If
`image` is connected, it emits an enriched PNG stream with the thumbnail width
and height. When both lanes have listeners, it emits both forms.

### Image documents

Only documents whose `type` is `Image` and whose `page_content` is non-empty
are processed. Unsupported documents, empty content, and document-level decode
or processing errors produce a warning and are skipped, while the node
continues processing the remaining documents in the batch. The emitted document
keeps a copy of the original metadata and adds an image-source layer for the
new thumbnail.

## Upstream docs

- [Pillow documentation](https://pillow.readthedocs.io/)

---

<!-- ROCKETRIDE:GENERATED:PARAMS START -->
<!-- Generated by nodes:docs-generate. Do not edit by hand. -->

## Schema

_No configuration fields._

## Source

[<svg viewBox="0 0 16 16" width="15" height="15" fill="currentColor" aria-hidden="true" style="vertical-align:-0.15em;margin-right:0.35em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> View source](https://github.com/rocketride-org/rocketride-server/tree/develop/nodes/src/nodes/thumbnail)
<!-- ROCKETRIDE:GENERATED:PARAMS END -->
