Nodes/ComfyUI-Studio-nodes/🖼️ JPG Converter & EXIF Stripper
ComfyUI Node

🖼️ JPG Converter & EXIF Stripper

Strip EXIF from anything and get a share-ready JPG out

By comfyuistudio·Created about a year ago·Updated 5 months ago· 4
🖼️ JPG Converter & EXIF Stripper
  • image
  • image
quality90
optimizetrue
progressivefalse
save_outputfalse
folder_namejpg_converted
filename_prefiximg

People don't usually think about EXIF until it bites them. If you img2img'd a real photo taken on your phone, that image can carry the original camera's GPS coordinates, timestamp and device model through the whole pipeline. And ComfyUI's own PNGs embed the full generation prompt and workflow - which is great for provenance, until you're posting something you'd rather not have reverse-engineered. JpgExifStrip is the end-of-pipeline guard: it converts whatever you give it to a clean JPEG with every scrap of metadata gone, by construction, not by hoping the encoder forgets something.

How it guarantees zero metadata

The trick is that it doesn't try to delete EXIF from your image - it round-trips the pixels through an in-memory JPEG buffer with no metadata argument at all, then reloads the result. Save JPEG → reload → save JPEG again with nothing attached. EXIF, XMP, IPTC, embedded workflow JSON, all of it gone, because there was never a place for it to live. That's the right way to do it: stripping metadata from an existing file is a list of edge cases, while re-encoding from clean pixels can't carry anything over.

The output image tensor is the cleaned, recompressed JPEG, so you can keep wiring it downstream if you want - though you generally won't, because the point is to save it.

Inputs that matter

  • quality - JPEG compression level, 1–100, default 90. This is your file-size knob. 90 is a good balance; drop to 80 for lighter files.
  • optimize (default on) - makes PIL do a smarter compression pass for a smaller file.
  • progressive (default off) - saves a progressive JPEG, the kind that loads blurry-to-sharp in browsers. Nicer for web sharing, marginally bigger in some cases.
  • save_output (default off) - this is the "actually write files" switch. Off, the node just shows you an in-node preview.
  • folder_name and filename_prefix - where and what it writes. Defaults are jpg_converted inside ComfyUI/output/, and img, which produces img_0001.jpg, img_0002.jpg, auto-incrementing so you never overwrite. Sanitizes the names so you can't accidentally break the path.

The honest trade-off

The output is lossy. This node is not for mid-pipeline use - if you feed it an image and keep processing the result, you've baked in JPEG compression artifacts you can't undo. Put it at the very end: generate, post-process, upscale, and only then convert to JPG. That's what it's for, and it does that job cleanly.

The other thing to accept: by stripping metadata you also lose your own ComfyUI workflow info on anything that passes through. If you're the type who likes to keep the prompt embedded for future you, use the regular Save Image node for your archive copy and JpgExifStrip only for the share copy.

Install

Standard clone, nothing exotic:

cd ComfyUI/custom_nodes
git clone https://github.com/comfyuistudio/ComfyUI-Studio-nodes

Restart ComfyUI and it appears under image/postprocessing as "JPG Converter & EXIF Stripper". The pack's dependencies are just numpy, torch and Pillow, all pre-installed with ComfyUI. Manager users: the pack isn't reliably in the catalog search, so use Manager's "install from git URL" field with the link above if you prefer clicks.

One caveat about this pack in general: it's a tiny, single-commit repo (4 stars, essentially unmaintained) - but this particular node is simple enough that the short source file is worth a skim if you're paranoid about your metadata pipeline. What you'll see is exactly the round-trip described above, nothing sneakier.

Categoryimage/postprocessing

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
qualityINT901–100JPEG compression quality (1=lowest, 100=highest)
optimizeBOOLEANtrueEnable JPEG optimization for smaller file size
progressiveBOOLEANfalseSave as progressive JPEG (loads gradually in browsers)
save_outputBOOLEANfalseSave the converted image(s) to ComfyUI/output/<folder_name>/
folder_nameSTRINGjpg_convertedSubfolder inside ComfyUI/output/ to save images into
filename_prefixSTRINGimgPrefix for saved filenames, e.g. 'img' → img_0001.jpg

Outputs (1)

NameTypeDescription
imageIMAGE