vercel/next.js · error · Error
Next Image Optimization requires ${missingValues.join(', ')}
Error message
Next Image Optimization requires ${missingValues.join(', ')} to be provided. Make sure you pass them as props to the `next/image` component. Received: ${JSON.stringify({ src, width, quality })} What it means
Error "Next Image Optimization requires ${missingValues.join(', ')} to be provided. Make sure you pass them as props to the `next/image` component. Received: ${JSON.stringify({ src, width, quality })}" thrown in vercel/next.js.
Source
Thrown at packages/next/src/shared/lib/image-loader.ts:19
import type { ImageLoaderPropsWithConfig } from './image-config'
import { findClosestQuality } from './find-closest-quality'
import { getAssetToken, getDeploymentId } from './deployment-id'
function defaultLoader({
config,
src,
width,
quality,
}: ImageLoaderPropsWithConfig): string {
if (process.env.NODE_ENV !== 'production') {
const missingValues = []
// these should always be provided but make sure they are
if (!src) missingValues.push('src')
if (!width) missingValues.push('width')
if (missingValues.length > 0) {
throw new Error(
`Next Image Optimization requires ${missingValues.join(
', '
)} to be provided. Make sure you pass them as props to the \`next/image\` component. Received: ${JSON.stringify(
{ src, width, quality }
)}`
)
}
}
// Extract dpl parameter early so validation uses the clean URL.
// If a immutable asset token should be used, it was already added as a query parameter and will
// be extracted and reused here.
let deploymentId = getDeploymentId()
if (src.startsWith('/') && !src.startsWith('//')) {
if (src.includes('/_next/static/immutable') && !getAssetToken()) {
// immutable static asset and supported by platform, don't add `?dpl=`
deploymentId = undefined
} else {View on GitHub (pinned to 0eb3775416)
Solutions
- Pass src, width, and quality (as required) to the next/image component.
Defensive patterns
Strategy: validation
When it happens
Trigger: The image loader is missing required src, width, or quality values.
Common situations: A custom loader receives incomplete props because width or quality was omitted from next/image.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/5bd8d05f7b11a3af.
Report an issue: GitHub.