Back to gallery
Media transforms
Resize an image from app code and watch the job finish over REN.
Live
media.transforms.resize + RenClient transform.* Live. The page generates a PNG, stores it, and calls
media.transforms.resize from the
form action. The job runs in the platform's media queue; the page follows it over REN
(transform.started → complete) instead of polling, and shows the derived .webp the moment it lands.Run a real resize
source · 480px png
no source yet
—
→
derived · 240px webp
—
—
…or declaratively on upload
A glob block in maravilla.config.ts runs the same
transforms automatically whenever a matching key is written.
// maravilla.config.ts — or declare transforms to run automatically on upload
export default defineConfig({
transforms: {
'public/uploads/**/*.{png,jpg}': { resize: { width: 480, format: 'webp' } },
'public/videos/**/*.mp4': { thumbnail: { at: '1s', format: 'webp' } }
}
}); tstransforms.* → JobHandle
resizescale an image imagethumbnailframe at { at } videotranscodemp4 / webm videoocrtext from image doc
Each returns JobHandle { id, output_key, status };
follow it on REN (transform.* events carry the jobId). Newer ops include watermark,
a thumbnail filmstrip (tile) and detectFaces.