/** * Finding: P-02 (og:image was an SVG, which major social platforms don't render) * * app/careers/[slug]/opengraph-image.tsx * * Next.js renders this to a 1200x630 PNG, caches it, and wires the og:image and * twitter:image tags automatically. Every shared job link gets a branded preview. */ import { ImageResponse } from "next/og"; import { db } from "@/lib/db"; export const size = { width: 1200, height: 630 }; export const contentType = "image/png"; export const alt = "Open role at Cynbit Technologies"; export default async function Image({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const job: { title: string; location: string } | null = await db.jobPosting.findFirst({ where: { slug, isOpen: true }, select: { title: true, location: true }, }); return new ImageResponse( (
Cynbit Technologies is hiring
{job?.title ?? "Careers at Cynbit"}
{job?.location ?? "Remote / Jaipur"} | cynbit.in/careers
), size, ); }