Scan your whole stack
From OX Research Newsroom
Are you using payload-og-image?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.3
payload-og-image was last scanned on 24 Nov 2026 at version 0.1.3. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.3 LATEST | 24 Nov 2026 | No rules fired |
| 0.1.2 | 24 Nov 2026 | No rules fired |
| 0.1.1 | 24 Nov 2026 | No rules fired |
| 0.0.0-stage | 24 Nov 2026 | Not shown |
Findings for v0.1.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.3; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A Payload CMS plugin that draws Open Graph share cards from your content. Every card URL carries a version derived from what the card shows, so a changed title or a replaced hero image gives a new URL and an unchanged one stays cached forever. Finished cards live on disk (or in memory), behind a bounded render queue, and a crash never leaves a half-written card behind.
Status: pre-1.0. The API can still change in a minor release. Every release is published to npm automatically from this repository, with provenance.
Compatibility: Payload ^3.93.0, Next.js ^16.4.5, React ^19.3.1, sharp ^0.35.4, Node
^22.23.5 || ^24.22.3 || >=26.13.1. ESM only.
pnpm add payload-og-image
Keep fontkit out of the Next bundle, in next.config:
serverExternalPackages: ['fontkit']
1. Register the plugin with your fonts, one template and one target per collection:
import { readFile } from 'node:fs/promises'
import { ogImagePlugin } from 'payload-og-image'
export default buildConfig({
serverURL: 'https://example.com',
plugins: [
ogImagePlugin({
site: async ({ payload }) => ({ name: 'Example' }),
fonts: [{ family: 'Inter', weight: 800, data: () => readFile('/abs/path/inter-800.woff') }],
stacks: { title: ['Inter'], default: ['Inter'] },
templates: [postCard], // made with defineTemplate(), see docs/templates.md
targets: {
posts: {
path: '/og/:kind/:slug/card.png',
template: 'post',
props: ({ doc, site }) => ({ label: 'Blog', title: doc.title, site: site.name }),
hero: ({ doc }) => doc.heroImage,
heroCollection: 'media', // the upload collection the hero lives in
},
},
store: { dir: '/var/lib/app/og-cards' }, // an absolute path on a volume only the app writes; `{ memory: true }` for tests
}),
],
// ...
})
2. Add the card route, app/(frontend)/og/[kind]/[slug]/card.png/route.ts:
import config from '@payload-config'
import { createOgRoute } from 'payload-og-image/next'
export const dynamic = 'force-dynamic'
const route = createOgRoute({ config })
export const GET = route.GET
export const HEAD = GET
3. Put the card in a page's metadata:
import { ogMetadata } from 'payload-og-image/next'
export async function generateMetadata({ params }: Props) {
const doc = await bySlug((await params).slug)
return { title: doc?.title, ...(await ogMetadata({ config, target: 'posts', doc })) }
}
A working Payload + Next app that wires all three is in dev/.
payload-og-image: ogImagePlugin, defineTemplate, defineTarget.payload-og-image/next: createOgRoute, ogMetadata, and withHead for Payload's REST route (which does not
answer HEAD, and LinkedIn sends one).payload-og-image/testing: installTestRuntime and ogKit, a test kit that calls your real route and metadata
modules and checks the failures this plugin exists to prevent (a draft cached, a stale version served as
immutable, a HEAD that differs from GET).og-parity, a bin that compares two directories of rendered cards pixel for pixel.Start at docs/INDEX.md: reference (image selection, cache headers, drafts, the store), templates, crawlers, operations.
See CONTRIBUTING.md. Report vulnerabilities as described in SECURITY.md.
Apache-2.0. See LICENSE and NOTICE.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.