Thumbnail
A RocketRide filter node that generates a 128×128 PNG thumbnail from an input image.
What it does
Resizes incoming images into compact, fixed-size thumbnails. It accepts either a raw image stream or Image documents, and outputs the resized result downstream. Useful for creating lightweight image previews before passing them to a vision LLM, reducing token usage and processing time compared to full-resolution images.
Uses Pillow (via the shared ai.common.image.ImageProcessor helper, the node itself
declares no extra requirements). Thumbnails are produced by stepwise downscaling (halving
until the larger side is ≤ 256 px, which avoids aliasing), an aspect-ratio-preserving
resize, and a final center crop to exactly 128×128 pixels. Output is always encoded
as PNG, preserving transparency.
The node is registered as a filter with class type image and has no configurable
fields.
Configuration
Lanes
| Lane in | Lane out | Description |
|---|---|---|
image | image | Resize raw image to thumbnail |
image | documents | Resize raw image and emit as document |
documents | documents | Resize image documents to thumbnail |
image lane in
Raw image data arrives as a chunked stream (BEGIN / WRITE / END). The node buffers
all chunks, loads the complete image once the stream ends, and generates the thumbnail.
It then emits on whichever output lanes have listeners attached:
documentslistener: the thumbnail is base64-encoded (PNG) and emitted as a singleDocof typeImagewith fresh metadata (chunkId,isTable: false,tableId: 0,isDeleted: false).imagelistener: the thumbnail is emitted as raw PNG bytes in a newBEGIN/WRITE/ENDstream, keeping the incoming MIME type.
documents lane in
Each incoming Doc of type Image has its base64 content decoded, thumbnailed, and
re-emitted as a new Image document with the original metadata preserved. Documents
are skipped with a warning (not an error) when they are not of type Image, have empty
content, or fail to decode/process, the remaining documents in the batch are still
processed.
None. The node's shape defines no properties; the thumbnail size (128×128) is fixed.
Schema
No configuration fields.