Add Logic to Your Processing Pipelines
Use JavaScript expressions to compute values, set fallbacks, and branch logic — all inline in your processing steps.
Use the full power of JavaScript to compute values dynamically based on file properties.
Provide default values for missing metadata using standard JavaScript operators.
Apply different processing based on file size, type, dimensions, or any metadata field.
Dynamic File Processing
Use JavaScript expressions to create intelligent processing pipelines.
Dynamic dimensions
Calculate output dimensions based on input file properties.
"width": "${file.meta.width * (720 / file.meta.height)}"

Fallback values
Provide default values when file metadata is missing.
"title": "${file.meta.title || 'Untitled'}"

Conditional logic
Apply different processing based on file type, size, or any metadata field.
"resize_strategy": "${file.meta.width > file.meta.height ? 'fit' : 'pad'}"
Simple Pricing
Bigger plans mean lower cost per GB. Need flexibility? Get a custom plan with spending limits. View all pricing options.
Perfect for trying out Transloadit
For teams with advanced needs
{
"steps": {
":original": {
"robot": "/upload/handle"
},
"resized": {
"use": ":original",
"robot": "/image/resize",
"width": "${Math.min(width, 1920)}",
"height": "${Math.min(height, 1080)}",
"imagemagick_stack": "${size > 5000000 ? 'v3.0.1' : 'v2.0.10'}"
},
"exported": {
"use": "resized",
"robot": "/s3/store",
"path": "${fields.category || 'uncategorized'}/${file.name}"
}
}
}Stop hardcoding processing parameters
Use any JavaScript expression inline with dollar-brace syntax.
Reference file.meta.width, file.meta.height, file.size, and all metadata fields.
Use Math, Date, String methods, and other JavaScript built-ins for complex logic.
Handle missing metadata gracefully with || operators and ternary expressions.
Scripts execute in under 1ms with a 1-second timeout for safety.
Simple variable access is free. Only complex JavaScript expressions are charged.
