build_imagor_url
Build a signed imagor image URL from typed transformation parameters. Compositions are validated first, so invalid combinations are refused instead of returned.
Instructions
Build a signed imagor image URL from typed transformation parameters. Requires IMAGOR_SECRET to be configured. The composition is validated before the URL is returned, so an invalid combination is refused rather than emitted. Read get_imagor_skill before composing anything, and call list_imagor_filters for each filter's signature, description and accepted argument forms, which are generated from imagor's own filter reference. Build and verify in a loop: a request returns 200 whether or not a filter did anything, so pass the same parameters to verify_imagor_url rather than assuming it worked. For a composed layout rendered at a canvas size, use render_template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | return image metadata only, without processing the image | |
| trim | No | trim surrounding space using the top-left pixel colour | |
| image | Yes | the source to transform, not a composed result: a URL or path such as "example.com/a.jpg", or a synthetic source such as "color:red" or "color:none" | |
| smart | No | use content-aware smart crop | |
| width | No | target width in pixels; 0 means automatic | |
| fit_in | No | fit inside width x height instead of cropping to fill; the result can be smaller than the box on one side | |
| h_flip | No | mirror horizontally | |
| height | No | target height in pixels; 0 means automatic | |
| v_flip | No | mirror vertically | |
| filters | No | ordered filters, applied left to right. Arguments are validated against imagor's catalogue: call list_imagor_filters for a filter's signature, description and accepted argument forms. image() loads its argument as its own canvas, so positions inside it are relative to the overlay | |
| h_align | No | horizontal alignment, either "left" or "right" | |
| stretch | No | stretch to exactly width x height, ignoring aspect ratio, which distorts the image; use full_fit_in to fill a box of a different shape without distorting it | |
| trim_by | No | trim anchor, either "top-left" or "bottom-right" | |
| v_align | No | vertical alignment, either "top" or "bottom" | |
| crop_top | No | crop top edge: a fraction 0-1 of the height, or absolute pixels when greater than 1 | |
| crop_left | No | crop left edge: a fraction 0-1 of the width, or absolute pixels when greater than 1 | |
| crop_right | No | crop right edge: a fraction 0-1 of the width, or absolute pixels when greater than 1 | |
| crop_bottom | No | crop bottom edge: a fraction 0-1 of the height, or absolute pixels when greater than 1 | |
| full_fit_in | No | cover the box without cropping: one side matches width x height and the other exceeds it, keeping the aspect. Use for an image that must fill a panel without cutting into it. Requires fit_in, and add upscale() when the source is smaller than the box | |
| trim_tolerance | No | trim tolerance from 0 to 255 | |
| adaptive_fit_in | No | invert width and height when that yields better definition; requires fit_in | |
| max_age_seconds | No | add a max_age() filter limiting how long the response may be cached | |
| expire_unix_millis | No | add an expire() filter so the URL stops working after this unix-milliseconds timestamp |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | a request path ready to send to imagor, including its signature or unsafe prefix | |
| mode | Yes | how the path was produced: signed or unsafe | |
| note | No | human-readable notes about the result | |
| path | Yes | the imagor path, without any signature or unsafe prefix | |
| signed | Yes | whether the URL carries a signature | |
| warnings | No | compositions that are valid but will not do what was intended | |
| absolute_url | No | the full URL to fetch, present only when IMAGOR_BASE_URL is configured |