Skip to main content
The @autorender/vue SDK provides Vue 3 components — <ARImage> and <ARVideo> — that render optimized media from an Autorender delivery URL, a useAutoRenderProvider composable for workspace config, and an uploader for browser uploads.

Prerequisites

Guide

1

Install the package.

If you use <ARVideo> (Video.js / HLS / DASH), add the autorenderVue() Vite plugin to your vite.config.ts:
vite.config.ts
If you don’t use <ARVideo>, skip the video CJS shims with videoShims: false:
vite.config.ts
2

Set up the provider.

App.vue
3

Render your first image.

ProductImage.vue
This renders an <img> resized to 400×400 px, cropped to fill, with a responsive srcset and lazy loading.

Examples

Complete transform example

HeroImage.vue

Video component

ProductVideo.vue

Upload widget

The uploader runs in the browser, so pass the API key from import.meta.env. Never hardcode the key.
Uploader.vue

API reference

autorenderVue(options?)

Vite plugin for @autorender/vue. Import from @autorender/vue/vite. Options:
  • videoShims?: boolean — CJS interop shims for Video.js sub-modules (default true). Set false if you don’t use <ARVideo>.

<ARImage />

Vue component that wraps <img> with Autorender transformations. Props:
  • src: string — image source path (required)
  • width?: number — image width in pixels
  • height?: number — image height in pixels
  • alt?: string — alt text
  • transformations?: TransformOptions — transformation options
  • responsive?: boolean — responsive images (default true)
  • lazy?: boolean — lazy loading (default true)
  • sizes?: stringsizes attribute for responsive images

<ARVideo />

Vue component that renders a Video.js player with Autorender transformations. Requires the autorenderVue() Vite plugin. Props: src, width, height, controls, preload, transformations

Next steps

Image transformations

Every parameter you can pass to transformations.

Direct upload API

The upload endpoint behind the widget.

Video transformations

Resize, trim, and thumbnail video for <ARVideo>.

All SDKs

Front-end and backend SDKs for every stack.