diff --git a/packages/next/src/NextVisual.tsx b/packages/next/src/NextVisual.tsx index 1f4571a..a707800 100644 --- a/packages/next/src/NextVisual.tsx +++ b/packages/next/src/NextVisual.tsx @@ -1,4 +1,8 @@ -import Image from 'next/image' +// `next/image` as importing as { default: Image, __esmodule: true } when +// this file was loaded by @react-visual/sanity-next. This is my hack to fix +import _Image from "next/image"; +const Image = ("default" in _Image ? _Image.default : _Image) as typeof _Image; + import type { ReactElement } from 'react' import { makeImagePlaceholder } from './lib/placeholder'