Restore dynamic OG image generation
1 minute read
The og/ route was disabled during the initial setup. Currently Meta.svelte uses the cover image directly via getCoverUrl() instead of a purpose-built 1200x630 OG image. Social sharing previews are
either missing or use an arbitrarily sized cover.
Current State
- No
src/routes/og/route exists Meta.sveltesetsog:imageto the raw cover image src (getCoverUrl(cover))- OG image meta tags claim 1200x630 PNG but the actual image may be a different size and format
Tasks
- Create
src/routes/og/[...path]/+server.jsroute that generates 1200x630 OG images - Decide on generation approach (satori, puppeteer, canvas, or static template)
- Update
Meta.svelteto pointog:imageat the generated OG endpoint instead of the raw cover - Ensure OG images are prerendered at build time for static hosting
Read next