Skip to main content

Load & Resize Image

KJNodes/image
LoadAndResizeImage

Example

JSON Example
{
  "class_type": "LoadAndResizeImage",
  "inputs": {
    "image": "https://example.com/input-image.png",
    "resize": false,
    "width": 512,
    "height": 512,
    "repeat": 1,
    "keep_proportion": false,
    "divisible_by": 2,
    "mask_channel": "alpha",
    "background_color": ""
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
imageENUM
1 options
  • example.png
URL: Image
required--
resizeBOOLEANrequired-false
widthINTrequiredmin: 0, max: 16384, step: 8512
heightINTrequiredmin: 0, max: 16384, step: 8512
repeatINTrequiredmin: 1, max: 4096, step: 11
keep_proportionBOOLEANrequired-false
divisible_byINTrequiredmin: 0, max: 512, step: 12
mask_channel?ENUM
4 options
  • alpha
  • red
  • green
  • blue
required--
background_color?STRINGrequired-""

Outputs

IndexNameTypeIs ListConnection Reference
0imageIMAGENo["{node_id}", 0]
1maskMASKNo["{node_id}", 1]
2widthINTNo["{node_id}", 2]
3heightINTNo["{node_id}", 3]
4image_pathSTRINGNo["{node_id}", 4]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this LoadAndResizeImage node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • image (IMAGE): ["5", 0]
  • mask (MASK): ["5", 1]
  • width (INT): ["5", 2]
Was this page helpful?