diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx index 5fab36fa31..fb0cf5bb44 100644 --- a/web/app/components/base/markdown.tsx +++ b/web/app/components/base/markdown.tsx @@ -143,6 +143,37 @@ export function Markdown(props: { content: string; className?: string }) { ) }, + img({ src, alt, ...props }) { + return ( + // eslint-disable-next-line @next/next/no-img-element + {alt} + ) + }, + p: (paragraph) => { + const { node }: any = paragraph + if (node.children[0].tagName === 'img') { + const image = node.children[0] + + return ( + // eslint-disable-next-line @next/next/no-img-element + {image.properties.alt} + ) + } + return

{paragraph.children}

+ }, }} linkTarget='_blank' >