SVG for Open Graph Images — Social Media Link Previews
Generate Open Graph images dynamically using SVG — crisp, branded link previews for Twitter, LinkedIn, and Facebook.
Drop your image here
Supports PNG, JPG, BMP, WEBP up to 5MB
Why Use SVG for OG Images
SVG-based OG image generation offers programmatic control over link preview images.
- Dynamic generation: include page title, author, and date in the SVG at build time
- Branded consistency: generate hundreds of unique OG images from one SVG template
- Sharp output: SVG renders at exact pixel quality — no blurry scaled images
- Vercel OG: @vercel/og uses React + Satori to render JSX to SVG to PNG at the edge
- Next.js 13+: built-in OG image generation via app/opengraph-image.tsx
OG Image Generation with Vercel/Satori
Modern Next.js apps use Satori to convert SVG/JSX to PNG for OG images.
- Install: npm install @vercel/og (or satori + resvg-js for non-Vercel)
- Create: app/opengraph-image.tsx exporting an ImageResponse with JSX
- Satori converts JSX → SVG → PNG at request time — no pre-generation needed
- Include: page title, site name, author avatar, article category
- Output: 1200×630 PNG — perfect for Facebook, Twitter, LinkedIn, iMessage
Frequently Asked Questions
Can I use an SVG file directly as an OG image?
No — Open Graph (og:image) requires PNG, JPG, or WebP. Social platforms don't render SVG OG images. Convert your SVG template to PNG for OG use.
What size should an OG image be?
1200×630px is the standard for all major platforms (Facebook, Twitter, LinkedIn). Twitter cards may also use 800×418. Use 1200×630 for maximum compatibility.
How does Vercel OG work?
@vercel/og uses Satori (SVG layout engine) to convert React JSX to SVG, then renders the SVG to PNG using resvg. The result is a PNG image generated at the edge for each request.
Can I add my company logo to OG images automatically?
Yes — embed the logo as a base64 data URI in the SVG template, or fetch it by URL in the OG image generator. Satori renders images from URLs or base64 data.
How do I test my OG images before publishing?
Use OpenGraph.xyz or Meta's Sharing Debugger (developers.facebook.com/tools/debug) to preview and validate OG images before they're published.
Related guides
Ready to Convert Your Image to SVG?
Free online converter — no sign-up, no watermarks, results in under 3 seconds.
Convert Image to SVG — Free