Skip to main content
Next.js (v10+) ships a built-in <Image> component. Plug Tenbyte into it with a custom loader — a few lines of config, no extra dependencies.

Prerequisites

  • Next.js 10+ (App Router or Pages Router).
  • A Tenbyte distribution with Image Optimizer enabled.
  • The Tenbyte CDN hostname for your account: your-distribution.tenbytecdn.com.

Setup

Use the Image component

Next.js will call tenbyteLoader for each srcset width, generating URLs like:

Verify

Should look like:

Tips

  • Set sizes — without it, Next.js requests the largest variant for every screen.
  • Use priority sparingly — only for above-the-fold images. It bypasses lazy-loading.
  • Whitelist domainsimages.yoursite.com should be in images.remotePatterns if you’re on App Router with stricter checks.
  • Avoid unoptimized — that disables the loader and ships the master file. The whole point of Tenbyte is to skip that.
  • Cap quality at 80 — visual difference vs 90 is negligible, bytes drop a lot.

Reference

Next.js Image documentation