← ClaudeAtlas

og-imageslisted

Generate branded per-page Open Graph (social share) cards for a website: a 1200×630 JPEG ≤300 KB for every page, rendered by a committed Python+Pillow script and wired so each page sets its own `image=` (with a default fallback) and the test suite proves the card exists at the right size. Use when building or auditing a site's share previews — "OG image", "og:image", "social share image", "share card", "WhatsApp/Slack/LinkedIn preview", "Twitter card image", "the picture when I share the link", "per-page OG images", "generate share images". For general marketing image creation/optimization use the `image` skill; this one is specifically the build-time, tested, per-page card generator for the suite's Astro starter.
karero/website-builder · ★ 4 · Code & Development · score 77
Install: claude install-skill karero/website-builder
# OG images — per-page share cards When a URL is shared (WhatsApp, Slack, iMessage, X, LinkedIn, Discord), the `og:image` is the preview. Get it wrong and the link shares with **no picture** or a badly cropped one — a silent conversion leak. This skill makes every page render a consistent, on-brand **1200×630 JPEG ≤300 KB**, generated by a committed script and enforced by the test gate. ## The three hard rules (messengers enforce them) 1. **1200×630, exactly** (1.91:1). Square images get cropped on X/Teams; off-ratio ones letterbox. The starter's `Base.astro` already emits `og:image:width/height` = 1200×630. 2. **≤300 KB.** WhatsApp silently **drops** previews heavier than ~300 KB — the link then shares with no image at all. Encode JPEG and compress to fit. 3. **Extension matches the bytes.** A PNG renamed `.jpg` trips strict scrapers. Use JPEG for photographic cards, PNG only for flat logo/gradient cards that still come ≤300 KB. ## How it's wired in the Astro starter - **`scripts/generate_og_cards.py`** — the generator. Renders one card per page you list, plus a `default.jpg`. Run it with **`npm run og`**. Idempotent; commit the output. - **`src/layouts/Base.astro`** — `image` prop defaults to `/images/og/default.jpg`. A page gets its own card by passing `image="/images/og/<slug>.jpg"`; a page with no `image=` falls back to the default — which only **exempt utility pages** should do (the test below enforces it). `og:image` + `twitter:image` are derived