diff --git a/packages/next/next-server/lib/post-process.ts b/packages/next/next-server/lib/post-process.ts index 04c9ad8225720..01e99bcc53dff 100644 --- a/packages/next/next-server/lib/post-process.ts +++ b/packages/next/next-server/lib/post-process.ts @@ -191,10 +191,7 @@ class ImageOptimizerMiddleware implements PostProcessMiddleware { acc + ``, '' ) - return result.replace( - /', imagePreloadTags) } } diff --git a/packages/next/next-server/server/config-shared.ts b/packages/next/next-server/server/config-shared.ts index 3b94c9d8b854f..8a355647d1d47 100644 --- a/packages/next/next-server/server/config-shared.ts +++ b/packages/next/next-server/server/config-shared.ts @@ -113,7 +113,7 @@ export const defaultConfig: NextConfig = { stats: false, externalDir: false, reactRoot: Number(process.env.NEXT_PRIVATE_REACT_ROOT) > 0, - disableOptimizedLoading: true, + disableOptimizedLoading: false, gzipSize: true, craCompat: false, }, diff --git a/packages/next/pages/_document.tsx b/packages/next/pages/_document.tsx index 19ef353bb41f7..57d95097eea19 100644 --- a/packages/next/pages/_document.tsx +++ b/packages/next/pages/_document.tsx @@ -705,6 +705,9 @@ export class Head extends Component< {!process.env.__NEXT_OPTIMIZE_CSS && (