IronFlowDocs

image_convert

Convert between image formats (e.g. PNG to JPEG). Output format is inferred from the output file extension.

Parameters

pathstringone of path or source_key
Input image path (supports ${ctx.key} interpolation)
source_keystringone of path or source_key
Context key containing a source path
output_pathstringrequired
Output image path (format inferred from extension)
qualitynumberdefault 85
JPEG quality (1-100), only used for JPEG output
output_keystringdefault "image_convert"
Prefix for output values

Context Output

  • <output_key>_path — output file path
  • <output_key>_format — output format (from extension)
  • <output_key>_successtrue on success

Example

local flow = Flow.new("image_convert_demo")

flow:step("convert", nodes.image_convert({
    path = "examples/fixtures/ironflow-sample.png",
    output_path = "output/photo.jpg",
    quality = 90
}))

flow:step("log", nodes.log({
    message = "Converted to: ${ctx.image_convert_path} (${ctx.image_convert_format})"
})):depends_on("convert")

return flow

IronFlow documentation

Find the next step

Type a keyword to search the documentation.

to move · Enter to open · Esc to close