Skip to content

spectr0b/awesome-og-images

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Awesome OG Images Awesome

A curated list of tools, libraries, and resources for generating Open Graph images

Open Graph images are the preview images shown when you share a link on social media. This list covers everything from APIs and libraries to templates and best practices.

Contents

Services & APIs

Free / Freemium

  • OG:IMAGE - Simple API that generates beautiful OG images. One URL = one image. 8 templates, $9/mo Pro tier. GET /api/og?title=Hello
  • Vercel OG - Generate dynamic OG images at the edge using React components. Free for Vercel users.
  • Cloudinary - Image transformation API with OG image support. Free tier available.

Paid

  • Bannerbear - Auto-generate images and videos. From $49/mo.
  • Placid - Design templates and generate images via API. From $19/mo.
  • RoboHash - Generate unique robot avatars. Free, useful for placeholder OG images.

Libraries

JavaScript/TypeScript

  • @vercel/og - Vercel's official OG image generation library using Satori.
  • satori - Convert HTML/CSS to SVG. Powers Vercel OG.
  • puppeteer - Headless Chrome for screenshot-based OG generation.
  • playwright - Cross-browser automation, alternative to Puppeteer.
  • node-canvas - Cairo-backed Canvas implementation for Node.js.
  • sharp - High-performance image processing, useful for post-processing OG images.

Python

  • Pillow - Python Imaging Library fork. Standard for image generation.
  • imgkit - HTML to image using wkhtmltoimage.
  • playwright-python - Python version of Playwright.

Go

  • gg - 2D rendering library for Go.
  • go-chart - Chart library that can output images.

Ruby

  • ruby-vips - Ruby bindings for libvips image processing.
  • mini_magick - Ruby wrapper for ImageMagick.

Frameworks with Built-in Support

  • Next.js - Built-in OG image generation with opengraph-image.tsx.
  • Astro - Static site generator with OG image recipes.
  • SvelteKit - Use with satori or puppeteer.
  • Remix - Use resource routes for OG generation.

Templates

Best Practices

Image Specifications

Platform Recommended Size Aspect Ratio
Twitter/X 1200×628 1.91:1
Facebook 1200×630 1.91:1
LinkedIn 1200×627 1.91:1
Discord 1200×630 1.91:1
Slack 1200×630 1.91:1

Essential Meta Tags

<meta property="og:image" content="https://example.com/og.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Description of image" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://example.com/og.png" />

Tips

  1. Always use 1200×630 - It's the universal safe size.
  2. Keep text large - Text should be readable at thumbnail size.
  3. Use contrast - Ensure text stands out from background.
  4. Include branding - Add logo or consistent visual identity.
  5. Test everywhere - Use validators to check appearance.

Articles

Validators & Testing Tools

Contributing

Contributions welcome! Read the contribution guidelines first.

License

CC0

About

A curated list of tools, libraries, and resources for generating Open Graph images

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors