import { ImageResponse } from "next/og"; import { BRAND, Mark, PulseBackdrop } from "@/components/brand"; import { api, type Stats } from "@/lib/api"; import { fmtInt } from "@/lib/format"; export const runtime = "nodejs"; export const alt = "WebSensor โ€” The Web is changing. We are watching."; export const size = { width: 1200, height: 630 }; export const contentType = "image/png"; /** Site-wide share image (spec ยง82โ€“83). Live counters come from the API; nothing is fabricated. */ export default async function OpenGraphImage() { const s: Stats = await api.stats().catch(() => ({}) as Stats); const facts = [s.sources ? `${fmtInt(s.sources)} sources` : null, s.sensors ? `${fmtInt(s.sensors)} sensors` : null, s.events_24h ? `${fmtInt(s.events_24h)} events / 24 h` : null].filter(Boolean) as string[]; return new ImageResponse( (
WebSensor
REAL-TIME INTERNET CHANGE INTELLIGENCE
The Web is changing. We are watching.
What changed, where, when, whether it was silent, how important it is โ€” with immutable evidence.
{facts.map((f) => ( {f} ))}
www.websensor.io
), { ...size }, ); }