DEV Community

loading...
Cover image for A free tool to generate Open Graph images for GitHub repos

A free tool to generate Open Graph images for GitHub repos

Joe Masilotti
Hi! I'm Joe Masilotti, an independent developer who's passionate about clean, testable code.
・1 min read

I made a free tool that generates Open Graph images for GitHub repos.

👉 mugshotbot.com/github

I work in open source and was tired of sharing ugly links on Twitter and Facebook. This is how they usually look.

Boring Twitter preview of a GitHub repo

One day I realized GitHub lets you upload a custom image, so I started making some templates. I figured I could work it into Mugshot Bot and use the GitHub API.

That eventually turned into a full product! It’s free to use. And it can create some nice Open Graph images for your open source projects.

Here's what that same repo looks like now. 😻

Improved Twitter preview of a GitHub repo

I use the GitHub API to pull in a few stats from the repo:

🌟 stars
🌍 language
🍴 forks
❗ open issues
👤 creator avatar

There's three different themes and you can customize the color and background pattern. Earlier this week a few folks helped me beta test - here's what they created!

Four examples of social previews for GitHub repos via Mugshot Bot

If you give it a try, reply with your repo and I'll check it out. Happy hacking folks! 👋

Discussion (2)

Collapse
braydentw profile image
Brayden W ⚡️

Very cool!

Collapse
joemasilotti profile image
Joe Masilotti Author

Thanks Brayden! And double thanks for helping beta test earlier this week.