diff --git a/packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts b/packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts index 9ea90f598ab10..1f12339357d0c 100644 --- a/packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-metadata-image-loader.ts @@ -168,11 +168,11 @@ async function nextMetadataImageLoader( return `\ import { fillMetadataSegment } from 'next/dist/lib/metadata/get-metadata-route' - export default (props) => { + export default async (props) => { const imageData = ${JSON.stringify(imageData)} const imageUrl = fillMetadataSegment(${JSON.stringify( pathnamePrefix - )}, props.params, ${JSON.stringify(pageSegment)}) + )}, await props.params, ${JSON.stringify(pageSegment)}) return [{ ...imageData,