diff --git a/src/PrismicNextImage.tsx b/src/PrismicNextImage.tsx index 6468e7e..86c4cab 100644 --- a/src/PrismicNextImage.tsx +++ b/src/PrismicNextImage.tsx @@ -142,8 +142,16 @@ export const PrismicNextImage = ({ ); } + // TODO: Remove once https://github.com/vercel/next.js/issues/52216 is resolved. + // `next/image` seems to be affected by a default + named export bundling bug. + let ResolvedImage = Image; + if ("default" in ResolvedImage) { + ResolvedImage = (ResolvedImage as unknown as { default: typeof Image }) + .default; + } + return ( -