diff --git a/apps/web/pages/api/social/og/image.tsx b/apps/web/pages/api/social/og/image.tsx index c37f0a0284..2a448b0d5a 100644 --- a/apps/web/pages/api/social/og/image.tsx +++ b/apps/web/pages/api/social/og/image.tsx @@ -1,11 +1,10 @@ import { ImageResponse } from "@vercel/og"; import type { NextApiRequest } from "next"; -import { remark } from "remark"; import type { SatoriOptions } from "satori"; -import strip from "strip-markdown"; import { z } from "zod"; import { Meeting, App, Generic } from "@calcom/lib/OgImages"; +import { md } from "@calcom/lib/markdownIt"; const calFont = fetch(new URL("../../../../public/fonts/cal.ttf", import.meta.url)).then((res) => res.arrayBuffer() @@ -75,10 +74,13 @@ export default async function handler(req: NextApiRequest) { meetingImage: searchParams.get("meetingImage"), imageType, }); + + const title_ = md.render(title).replace(/(<([^>]+)>)/gi, ""); + const img = new ImageResponse( ( ({ name, username: usernames[index] }))} /> @@ -108,8 +110,8 @@ export default async function handler(req: NextApiRequest) { description: searchParams.get("description"), imageType, }); - const description_ = await (await remark().use(strip).process(description)).toString(); - const img = new ImageResponse(, ogConfig) as { + + const img = new ImageResponse(, ogConfig) as { body: Buffer; };