Save Image Base64 (CRT)
For when your workflow's output needs to leave as data, not a file
- images
- base64_data
Most save nodes assume the same thing: write a file to disk, done. That's fine when a human is going to open the output folder afterward. It breaks down the moment you're driving ComfyUI programmatically - calling it through its API, wiring it behind another app, or piping results into something that expects a response payload rather than a file path it now has to go fetch separately. This node covers that case: instead of writing to disk, it encodes your image straight into a base64 string you can hand off directly.
What it does
Takes your image, encodes it in your choice of format, and outputs the result as a plain string - no file gets written, no is_output_node behavior, it's a regular data-producing node you keep wiring things into. That's the core distinction from every other save node in the pack: this one is for when the encoded data itself is the deliverable, not a path on disk. Useful cases: returning image data directly from an automated ComfyUI pipeline, feeding a preview widget in a custom frontend that expects inline image data, or handing results to a downstream API call or webhook that wants the bytes, not a filesystem reference it may not even have access to.
One thing worth knowing before you go looking for it: this is a conditionally registered node. The pack's README is explicit that Save Image Base64 only loads if its underlying import succeeds - if you don't see it after installing CRT-Nodes, that's expected pack behavior (an optional dependency didn't resolve), not necessarily something broken in your setup, and it won't stop the rest of the pack's hundred-plus other nodes from working normally.
The inputs and output that matter
images- your image (or batch) to encode.format(PNG / JPEG / WEBP, default PNG) - pick based on what you actually need: PNG for lossless, JPEG or WEBP if you want a smaller payload and can tolerate some compression.quality(1-100, default 95) - only meaningful for JPEG/WEBP; ignored for PNG since it's lossless.
Output: base64_data, a STRING - feed it wherever your downstream consumer expects encoded image data.
How to install it
Part of CRT-Nodes. Via ComfyUI Manager, search CRT-Nodes and install. Manually: git clone https://github.com/PGCRT/CRT-Nodes.git into custom_nodes, pip install -r requirements.txt, restart.
Common issues & troubleshooting
The node doesn't appear in your node list at all. Given it's conditionally registered, check your ComfyUI startup log for an import message related to this specific node rather than assuming the whole pack failed - the rest of CRT-Nodes' catalog is designed to keep loading normally even when one optional node's dependency isn't satisfied.
Base64 payload is much larger than expected. That's inherent to base64 encoding itself (roughly a third larger than the raw bytes) compounded by your format choice - PNG at high resolution will produce the largest strings by far. Switch to JPEG or WEBP and drop quality a bit if payload size matters more than pixel-perfect fidelity.
Downstream consumer can't decode the string. Confirm whether it expects a raw base64 string or a data URI (data:image/png;base64,...) - this node outputs the raw encoded string only, so you may need a small text-concatenation step if your consumer expects the URI prefix.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| format | COMBO | PNG | 3 options: PNG, JPEG, WEBP |
| quality | INT | 951–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| base64_data | STRING | — |