<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
tenbyteLoader for each srcset width, generating URLs like:
Verify
Tips
- Set
sizes— without it, Next.js requests the largest variant for every screen. - Use
prioritysparingly — only for above-the-fold images. It bypasses lazy-loading. - Whitelist domains —
images.yoursite.comshould be inimages.remotePatternsif 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.