@autorender/js SDK is the core package: an Upload SDK for browser file uploads and a ViewTag SDK for building transformation and responsive-image URLs. Every framework adapter (React, Vue, Angular, Svelte) builds on it.
Prerequisites
- An Autorender account with a workspace ID — create one in the dashboard
Guide
1
Install the package.
2
Initialize the client.
3
Generate your first URL.
w_400,h_400), crops to fill (c_fill), and applies f_auto,q_auto defaults.Examples
Transform string only
Video URLs
Upload widget
The widget runs in the browser, so read the API key from an environment variable rather than hardcoding it.API reference
createAR(config: CreateARConfig): ARInstance
Creates an Autorender client instance for image transformations.
Config options:
baseUrl?: string— base URL (default'https://assets.autorender.io')workspace: string— your workspace IDdefaults?: { f?: string, q?: string | number }— default transformationsdeviceBreakpoints?: number[]— device breakpoints for responsive imagesimageBreakpoints?: number[]— image breakpoints for responsive images
Next steps
Image transformations
Every parameter
AR.url() accepts.Direct upload API
The upload endpoint behind the widget.
Video transformations
Build resize, trim, and thumbnail URLs for video.
All SDKs
Framework adapters built on this package.