API & Integration -> RenderScript

Image properties in RenderScript

These properties extend the base element properties.

Source

URL or GUID of the image file. When using AI generation (via 'provider' property), this becomes the text prompt for image generation.

Example

"source": "https://...",

Default

"source": null,

Provider

Enables AI image generation using specified provider and AI model. When set, the 'source' value is used as the generation prompt. Use the template editor to understand how the provider is formatted.

Example

"provider": "openai ...", "source": "A beautiful sunset"

Default

"provider": null,

Fit

Controls how the image is resized within the element bounds: 'cover' (fills area, may crop), 'contain' (fits entirely, may letterbox), or 'fill' (stretches to fill).

Example

"fit": "contain",

Default

"fit": "cover",