Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-JPG-Metadata > Save Image (JPG)

ComfyUI Node: Save Image (JPG)

Class Name

SaveImageJPG

Category
image
Author
amarillys (Account age: 0days)
Extension
ComfyUI-JPG-Metadata
Latest Updated
2026-09-18
Github Stars
0.0K

How to Install ComfyUI-JPG-Metadata

Install this extension via the ComfyUI Manager by searching for ComfyUI-JPG-Metadata
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-JPG-Metadata in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Save Image (JPG) Description

Saves image batches as numbered JPEGs with adjustable quality and optional EXIF metadata.

Save Image (JPG):

SaveImageJPG saves images from a ComfyUI workflow as JPEG files in the configured output directory. It is an output node, so its purpose is to produce files rather than pass images to another node. It saves each image in a batch separately, numbers the files to help keep them distinct, and reports the saved files to the interface. JPEG is useful when you want widely compatible images with an adjustable balance between visual quality and file size. Because JPEG does not support transparency, the node converts images with an alpha channel to RGB before saving. When metadata is enabled in ComfyUI, the node can also write available workflow-related information into JPEG EXIF metadata.

Save Image (JPG) Input Parameters:

images

The images to save, supplied through an IMAGE connection. The node processes every image in the batch and creates a separate JPEG for each one. This input must contain at least one image: the node reads the first image’s dimensions while preparing the save location. No default, minimum, or maximum batch size is specified in the provided node interface.

filename_prefix

A STRING used as the starting text for saved filenames. Its default is ComfyUI; no length limit or set of options is specified in the node interface. The node passes this prefix to ComfyUI’s image-path helper, which determines the output location and base filename, then adds a five-digit counter and the .jpg extension. If the resulting filename contains %batch_num%, the node replaces that text with the image’s zero-based position in the batch.

quality

An INT setting that controls JPEG encoding quality. Its default is 95, its minimum is 1, its maximum is 100, and it changes in steps of 1. Lower values generally produce smaller files with more visible compression; higher values generally retain more detail but produce larger files. This setting is passed directly to the JPEG saver and does not change the images earlier in your workflow.

Save Image (JPG) Output Parameters:

SaveImageJPG has no output sockets. After saving, it returns information about the saved files to the ComfyUI interface, including each file’s name, subfolder, and output type. You can inspect the result in the interface, but you cannot connect this node’s result to another node as an image output.

Save Image (JPG) Usage Tips:

  • Use a descriptive filename_prefix to distinguish exports from different projects or workflow runs. Include %batch_num% when you want the image’s position within a batch reflected in the filename.
  • Start with the default quality of 95 when image detail matters. Try a lower value when smaller files are more important, and inspect the saved JPEG for unwanted compression artifacts.
  • If your artwork needs transparency, keep a transparency-supporting copy elsewhere in your workflow. This node converts RGBA images to RGB for JPEG saving, so the saved file will not retain an alpha channel.
  • Connect a non-empty image batch before running the node. It saves each image separately and advances the filename counter for each file.

Save Image (JPG) Common Errors and Solutions:

IndexError: index 0 is out of bounds or another error while accessing images[0]

  • Explanation: The node uses the first image to determine dimensions before saving. An empty image batch has no first image; the exact error wording depends on how the batch is represented.
  • Solution: Check that an upstream node produces at least one image and that its IMAGE output is connected to images.

AttributeError involving shape, cpu, or numpy

  • Explanation: The node expects image data in the format supplied by a compatible ComfyUI IMAGE connection. Data in another form may not have the properties or operations the save routine uses.
  • Solution: Connect a compatible IMAGE output directly, or use an appropriate conversion node before SaveImageJPG.

TypeError: Cannot handle this data type or a JPEG image-mode error

  • Explanation: The image could not be converted into a form Pillow can save as JPEG. The node explicitly converts RGBA images to RGB, but the supplied image may have another unsupported shape or mode.
  • Solution: Check the upstream image-processing nodes and supply a standard image compatible with the IMAGE input.

PermissionError or OSError while saving the file

  • Explanation: The JPEG could not be written to the output location. Possible causes include insufficient write permissions, an unavailable output location, or lack of storage space; the precise message depends on the operating system.
  • Solution: Check that ComfyUI’s configured output directory is accessible and writable, that storage is available, and that the resulting filename is valid for your system.

quality is outside the allowed range

  • Explanation: The node interface permits whole-number quality values from 1 through 100. A value outside that range may be rejected during input validation.
  • Solution: Set quality to a whole number between 1 and 100.

Save Image (JPG) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-JPG-Metadata
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Save Image (JPG)