Skip to main content
The @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

Guide

1

Install the package.

2

Configure Next.js and add the provider.

Wrap your config with withAutorender in next.config.js or next.config.ts:
next.config.ts
Then set up the provider in your root layout:
app/layout.tsx
3

Render your first image.

Use <ARImage> in place of next/image for transforms and a responsive srcset.
app/product/page.tsx
This renders a 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 from NEXT_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 pixels
  • height?: number — image height in pixels
  • transformations?: TransformOptions — transformation options
  • responsive?: boolean — responsive images (default true)
  • sizes?: stringsizes attribute for responsive images
  • priority?: boolean — disable lazy loading for above-the-fold images (default false)
  • placeholder?: 'blur' | 'empty' — placeholder while the image loads
  • blurDataURL?: string — base64 data URL for the blur placeholder
  • quality?: number — image quality, 1–100
  • fill?: boolean — fill the parent container (omit width/height when 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.