@autorender/nextjs SDK wraps next/image with Autorender URL generation through <ARImage>, adds a withAutorender config helper, and ships the <AutorenderUploader> widget for browser uploads.
Prerequisites
- An Autorender account with a workspace ID — create one in the dashboard
- A Next.js project
Guide
1
Install the package.
2
Configure Next.js and add the provider.
Wrap your config with Then set up the provider in your root layout:
withAutorender in next.config.js or next.config.ts:next.config.ts
app/layout.tsx
3
Render your first image.
Use This renders a
<ARImage> in place of next/image for transforms and a responsive srcset.app/product/page.tsx
next/image resized to 400×400 px, cropped to fill, with a responsive srcset.Examples
Complete transform example
app/hero/page.tsx
Video component
app/product-video/page.tsx
Upload widget
The widget runs in the browser, so pass a public key fromNEXT_PUBLIC_AUTORENDER_API_KEY. Never hardcode the key.
app/upload/page.tsx
API reference
withAutorender(nextConfig)
Wraps your Next.js config to add Autorender optimizations. Import from @autorender/nextjs/next-config.
<ARImage />
Wraps next/image with Autorender URL generation. Accepts all next/image props except src and srcSet. width, height, and sizes are passed through — Autorender uses them to build the transformed URL and responsive srcset. Lazy loading is handled natively by next/image; use priority for above-the-fold images instead.
Props:
src: string— image source path (required)width?: number— image width in pixelsheight?: number— image height in pixelstransformations?: TransformOptions— transformation optionsresponsive?: boolean— responsive images (defaulttrue)sizes?: string—sizesattribute for responsive imagespriority?: boolean— disable lazy loading for above-the-fold images (defaultfalse)placeholder?: 'blur' | 'empty'— placeholder while the image loadsblurDataURL?: string— base64 data URL for the blur placeholderquality?: number— image quality, 1–100fill?: boolean— fill the parent container (omitwidth/heightwhen using this)
<ARVideo />
Wraps Video.js with Autorender URL generation. 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.