Prepare image options without mutating configuration (#99394)
## Summary Image helpers and components sort arrays from their configuration, which fails when that configuration comes from a frozen deployment manifest. Prepare owned image options once and reuse them across rendering and `getImageProps`. This supports immutable Next.js configuration in Vercel adapter deployments. Modern and legacy Image components share a `useImageConfig` hook that preserves existing configuration selection and SSR `localPatterns` validation. `getImageProps` prepares its fixed options once at module initialization without context. ## Verification Existing local-pattern, query-string validation, and custom-loader production fixtures pass with Webpack and Turbopack. Development checks cover local patterns, legacy remote-image rejection, and the static-export diagnostic with both bundlers. <!-- NEXT_JS_LLM -->
Showing
Please
register
or
sign in
to comment