Images to Base64 List
Export frames as base64 text — your images, as one pasteable string
- images
- base64_list
You generated images in ComfyUI and now you need them somewhere else - an API call, a JSON payload, a script on another machine, a support thread. Frames don't travel well as tensors. Images to Base64 List encodes each image in your batch as a base64 string and joins them into a single text blob you can pipe anywhere.
It's the encode half of this pack's text bridge. The pack is ComfyUI Image to Video Inserter by Yeq6X, and its Base64 List to Images node is the exact reverse: paste the blob back in, get the images back. That round trip is the pack's answer to moving frames through systems that only understand text. If you're storing frames in a database, shipping them to a remote processor, or logging them for later, this node is the point where images become data.
How it works
Dead simple and dependable. Each image in the input batch gets converted to a Pillow image and saved as a PNG in memory, then that PNG's bytes are base64-encoded. The individual strings are joined with newlines - so the output text field contains one line per image. Two things worth noting:
- PNG only, no data-URI prefix. You get raw base64 of a PNG, not
data:image/png;base64,.... That keeps the string portable, but if a target expects a data URI you'll be prepending the header yourself. - Both list and batch inputs work. The node checks whether you fed it a list of single-frame tensors or a proper
B,H,W,Cbatch, and enumerates frames either way.
Inputs and outputs that matter
images- anIMAGEtensor (a frame batch or list). That's the whole input story; there are no settings to fiddle with.
The output is base64_list (STRING) - one base64-encoded PNG per line. A 512×512 image becomes roughly 300–600KB of text, so don't be shocked by the character count; base64 adds about a third on top of the PNG size. If the result is going into a fixed-size field somewhere, keep it short or pick a different transport.
Installing it
It ships in the one-pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/Yeq6X/ComfyUI-image-to-video-inserter
then restart ComfyUI (or use ComfyUI Manager and search "Image to Video Inserter"). Nothing to download, no keys. Dependencies are the standard ComfyUI stack - torch, numpy, Pillow - plus opencv-python for the pack as a whole; a missing cv2 usually shows up as the whole pack failing to appear in your node menu.
When to reach for it
Reach for this when images need to leave the graph as text: building JSON to send to an image API, storing frames in a database column, pasting a preview into a bug report, or preparing data for a system that isn't running ComfyUI. And when the blob comes back, remember the pack's Base64 List to Images is waiting to decode it. For a node that's genuinely just "PNG → base64", it's remarkably convenient - the sort of thing you install once, forget you have, and thank yourself for later.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| base64_list | STRING | — |