Skip to main content

renderStillOnVercel()v4.0.425

Renders a still image inside a Vercel Sandbox. Writes a render script to the sandbox, executes it, and returns the output file path.

The rendered file stays inside the sandbox. Use uploadToVercelBlob() to upload it to Vercel Blob.

Example

const {file} = await renderStillOnVercel({
  sandbox,
  compositionId: 'MyComp',
  inputProps: {title: 'Hello World'},
  imageFormat: 'png',
});

Arguments

An object with the following properties:

sandbox

A Sandbox instance.

compositionId

The ID of the Remotion composition to render.

inputProps

Props to pass to the composition.

imageFormat?

The output image format. Default: "png". Can be "png", "jpeg", or "webp".

outputFile?

The output file path inside the sandbox. Default: "/tmp/still.png".

onProgress?

A callback that receives render progress updates. See renderVideoOnVercel() for the type definition.

bundleDir?

The bundle directory name in the sandbox. Default: ".remotion".

Return value

An object containing:

file

The path to the rendered still image inside the sandbox.

See also