Cannot render embedded image
ImranSefat opened this issue · 2 comments
I have a list of headings, body, images, etc.
While rendering the block with the help of react-portabletext in a NEXT JS project with Typescript I don't see the image in the rendered HTML. After I have inspected it to look for the image, i see a div like below:
<div style="display:none">[@portabletext/react] Unknown block type "image", specify a component for it in the
components.types prop</div>
In the PortableText
component I am using it like this below:
<PortableText value={data.body} onMissingComponent={false} />
Hey there, i encountered the same error can i see your code and maybe help?
it was a pretty simple fix for me.
@KennedyNvsf, thanks for reaching out. I have fixed this issue by defining the template. working fine now.