vercel/next.js · error · Error
Image with src "${src}" is using a query string which is not
Error message
Image with src "${src}" is using a query string which is not configured in images.localPatterns.
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns What it means
Error "Image with src "${src}" is using a query string which is not configured in images.localPatterns. Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns" thrown in vercel/next.js.
Source
Thrown at packages/next/src/shared/lib/image-loader.ts:61
const srcDpl = params.get('dpl')
if (srcDpl) {
deploymentId = srcDpl
params.delete('dpl')
const remaining = params.toString()
src = src.slice(0, qIndex) + (remaining ? '?' + remaining : '')
}
}
}
}
if (
src.startsWith('/') &&
src.includes('?') &&
config.localPatterns?.length === 1 &&
config.localPatterns[0].pathname === '**' &&
config.localPatterns[0].search === ''
) {
throw new Error(
`Image with src "${src}" is using a query string which is not configured in images.localPatterns.` +
`\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`
)
}
if (process.env.NODE_ENV !== 'production') {
if (src.startsWith('//')) {
throw new Error(
`Failed to parse src "${src}" on \`next/image\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)`
)
}
if (src.startsWith('/') && config.localPatterns) {
if (
process.env.NODE_ENV !== 'test' &&
// micromatch isn't compatible with edge runtime
process.env.NEXT_RUNTIME !== 'edge'
) {View on GitHub (pinned to 0eb3775416)
Solutions
- Add a matching entry to images.localPatterns in next.config.js, or remove the query string from src.
Defensive patterns
Strategy: validation
When it happens
Trigger: next/image src has a query string not matched by images.localPatterns.
Common situations: A local image with ?query params while localPatterns is configured without a matching entry.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/379a94189ea43b13.
Report an issue: GitHub.