Transloadit
Pricing
  • File Uploads
  • File Importing
  • Video Encoding
  • Audio Encoding
  • Image Processing
  • Document Processing
  • Artificial Intelligence
  • File Filtering & Security
  • Media Cataloging
  • File Compression
  • Code Evaluation
  • File Exporting
  • Smart CDN
  • View all services
  • Explore integrations
  • Explore live demos
  • Uppy
  • TransloaditKit
  • Android SDK
  • Node SDK
  • Python SDK
  • Ruby SDK
  • Go SDK
  • Java SDK
  • PHP SDK
  • Zapier
  • MCP Server
  • Terraform
  • Essentials
  • Best Practices
  • FAQ
  • Robots
  • API
  • Formats
  • Build your first app
  • About
  • Comparisons
  • Open Source
  • Testimonials
  • Jobs
  • Security
  • Posts
  • DevTimes
  • DevTips
  • Press
  • Research
  • Case Studies
  • Solutions
  • Guides
  • Glossary
  • Legal
  • Tools
  • Helping Coursera bring education to millions around the world
  • Transloadit Support
  • Open Source Support
  • Service level agreement
EssentialsRobotsFAQAPIFormatsBest Practices
Getting started
  • Overview
  • My first App
  • Saving result files
Topics
  • Assembly Instructions
  • Assembly Variables
  • Dynamic Evaluation
  • Templates
  • Webhooks
  • Third party Credentials
  • Builtin Templates
  • Resize Strategies
  • Assembly Execution Progress
  • Workspaces
  • AI Agents
  • Advanced use Parameter
  • The ignore_errors Parameter
Software Development Kits
  • Overview
  • Android SDK
  • Browsers
  • Convex
  • cURL
  • Go SDK
  • Java SDK
  • MCP Server
  • Multipart Form
  • Node.js SDK
  • PHP SDK
  • Python SDK
  • Ruby SDK
  • Terraform
  • TransloaditKit
  • Zapier Integration

Dynamic Evaluation

If placeholder variables like ${file.meta.width} aren't enough to implement your application logic, you can also use the full feature set of modern JavaScript to create dynamic Assembly instructions. These scripts will be executed on our infrastructure, and have access to all Assembly Variables. This includes a file's meta data that Transloadit automatically determines, basic information about the Assembly runtime, and fields that can be populated by you as a developer when creating the Assembly.

For example, you might want to resize images to adhere to the design principle of the Golden Ratio⁠:

{
  "robot": "/image/resize",
  "height": "${file.meta.width / (1 + Math.sqrt(5))/2}",
  "resize_strategy": "crop"
}

Or you could want to transform the output file name to upper case when uploading to S3:

{
  "robot": "/s3/store",
  "path": "my-folder/${file.name.toUpperCase()}"
}

Everything inside ${...} will get evaluated, and you have all JavaScript language features available, as long as your script doesn't perform any asynchronous operations. For example, you can use Math⁠, Date⁠ or String⁠ methods.

Variable lookup

Dynamic evaluation is free of charges when it is a simple lookup, such as ${file.name} or ${file.meta.faces[0]}.

For more complex evaluations, such as ${Math.max(10, file.meta.width)}, there are charges. This is because we invoke 🤖/script/run to interpret JavaScript, making evaluations harder on our machines, and a few milliseconds slower, but with a full programming language at your disposal, also that much more powerful.

Previous page ← Assembly VariablesNext page Templates →
TransloaditChecking status…

Product

  • Services
  • Pricing
  • Demos
  • Tools
  • Security
  • Support

Company

  • About/Press
  • Blog/Jobs
  • Comparisons/Compliance matrix
  • Research
  • Open source
  • Solutions

Docs

  • Getting started
  • Transcoding
  • FAQ
  • API
  • Guides/DevTips
  • Supported formats

More

  • Platform status⁠
  • Community forum⁠
  • StackOverflow⁠
  • Uppy
  • tus⁠

© 2009–2026 Transloadit-II GmbH

PrivacyTermsImprint