Nodes/LF Nodes/Multiple image resize for Web
ComfyUI Node

Multiple image resize for Web

Batch-resize a folder of images without leaving the graph

By lucafoscili·Created 2 years ago·Updated 2 years ago· 50
Multiple image resize for Web
  • image
  • ui_widget
  • image
  • image_list
  • name
  • name_list
  • names_with_dir
  • dataset
file_name

Every time you finish a batch and think "okay, now shrink all of these to 1024px so they don't kill the site," you're about to leave ComfyUI, open an image tool, and do it manually. LF_MultipleImageResizeForWeb is the node that lets you stay in the graph: feed it a list of images with their file names and it returns resized versions plus a structured dataset - names, paths, everything you need to hand the batch to a saver or an uploader.

The mechanism is a name/image pairing. You give it an image input (a list of image tensors) and a file_name input (the corresponding list of names), and it processes them together so every resized image keeps its identity. Where it fits in a real workflow: an image-batch loader or generator feeds image, the file names come from wherever your source knows them, and what comes out is ready for the web - hence the category and the name. The frontend renders the batch in a masonry gallery widget so you can eyeball the whole result at once, which is more useful than it sounds when you're checking a 40-image batch.

Outputs worth knowing:

  • image / image_list - the resized images, both as a batch and as a list, so you can either keep them batched for one saver or split them per-image.
  • name / name_list - the (resized) file names, again in both forms.
  • names_with_dir - names prefixed with their directory, for saving into the right folder without extra string plumbing.
  • dataset - a JSON bundle of images and names together, the one to reach for when you're feeding a node that wants the whole batch as a single structured payload.

The honest caveat: this node is a web-prep step, not an upscaler. It resizes for delivery - think thumbnails, gallery grids, portfolio pages - not "add detail" upscaling. If your source is already final quality and you just need smaller files, this is exactly right. If you're trying to make a soft image better while shrinking it, that's a different job entirely (and per the upscaling lore, "more pixels" and "more detail" are different jobs). Keep this one for the delivery step.

Install is the LF standard: ComfyUI Manager → "LF Nodes", or

cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf

then restart. Nothing to download beyond the pack - pure CPU work, no models. One pack note if you're new here: comfyui-lf is in legacy mode (frozen but fully functional), with active development in lucafoscili/lf-nodes; the resize nodes live on in both.

It's not a flashy node - but if you ship image batches to the web regularly, it quietly removes one of the most boring recurring steps in your pipeline.

Category✨ LF Nodes/Image

Inputs (3)

NameTypeDefaultDescription
imageIMAGEList of images to process.
file_nameSTRINGCorresponding list of file names for the images.
ui_widgetoptKUL_MASONRY[object Object]

Outputs (6)

NameTypeDescription
imageIMAGE
image_listIMAGE
nameSTRING
name_listSTRING
names_with_dirSTRING
datasetJSON