SaveImageS3 R2 Sidebar
Save ComfyUI images to S3-compatible storage with local previews, public links, and a native sidebar.
ComfyUI-SaveImageS3
Save generated ComfyUI images to S3-compatible storage such as Cloudflare R2, MinIO, AWS S3, or other S3 API services.
This fork rewrites the extension for current ComfyUI Desktop/manual installs and adds an asset sidebar with preview thumbnails, public links, copy/open actions, persistent config, and upload history.
Features
Save Image S3output node.- Saves a local PNG copy like ComfyUI's native Save Image node.
- Uploads the PNG and a JSON metadata file to S3-compatible storage.
- Builds a public URL from
Public URL + object key, which works well with Cloudflare R2 custom domains. - Randomizes uploaded S3 object names to avoid predictable public URLs.
- Shows uploaded assets in a left sidebar with local preview thumbnails.
- Provides
CopyandOpenactions for every uploaded public link. - Stores config and upload history outside workflow JSON, so credentials are not embedded in workflows.
Installation
Clone this repository into ComfyUI/custom_nodes/ComfyUI-SaveImageS3 and install dependencies in the ComfyUI Python environment:
pip install -r requirements.txt
Restart ComfyUI after installation.
Configuration
Open the SaveImageS3 sidebar from the S3 rail button, the ComfyUI settings entry, or the canvas context menu.
Fields:
Scheme: Friendly name, for exampler2.Endpoint: S3 API endpoint, for example<account>.r2.cloudflarestorage.com.Bucket: Bucket name.Access Key: S3 access key.Secret: S3 secret key. The UI does not return the stored secret after save.Public URL: Public asset base URL, for examplehttps://img.example.com/.Region: Region string, orautofor services such as R2.HTTPS: Whether to use HTTPS when connecting to the S3 API.
Config and upload history are stored under this plugin's data/ directory:
data/config.jsondata/history.json
Do not commit data/config.json; it contains credentials.
Usage
Add Save Image S3 to your workflow and connect an IMAGE input.
Inputs:
filename_prefix: Local output filename prefix, same purpose as the native Save Image node.object_prefix: Optional S3 object key prefix, for examplecomfyui/outputs.
On execution, the node:
- Saves the image to ComfyUI's local output directory.
- Uploads the PNG to S3.
- Uploads a JSON metadata file next to it.
- Records the public link in history.
- Shows the latest upload in the SaveImageS3 sidebar.
The local filename remains the normal ComfyUI output filename for preview/history. The uploaded S3 object name is randomized, so public URLs do not expose predictable counters such as ComfyUI_00026_.png.
Cloudflare R2 Notes
R2's S3 put_object response does not return your custom-domain public URL. Set Public URL to the R2 custom domain base URL, and this extension will join it with the uploaded object key.
Example:
Public URL: https://img.example.com/
Object key: comfyui/ComfyUI_00001_.png
Result URL: https://img.example.com/comfyui/ComfyUI_00001_.png
Tests
python -m pytest tests -v
python -m compileall -q .
node --check web/plugin.js