Social Media Preview Images for Your GitHub Projects

Did you know you can specify a social media preview image for your GitHub projects?

Neither did I.

The social media preview image is different from any images you add to your repo’s folders or on your README. I was browsing the settings for one of my repositories when I came across this.

Screen Shot 2020-08-29 at 10.10.45 PM.png

The social preview option is available under your project repo and settings. I decided to test it out.

This is what the default social media preview looks like before uploading an image.

without-social-preview.png

A GitHub repo link posted in Discord without a social media preview image By default, if there’s no social media preview specified, a GitHub repo link will expand (if that is an option on the social media platform) to show the name of the project, description, and the user’s or organization’s avatar.

And with a social media preview image, this is what I would see in the expanded preview on Discord.

Screen Shot 2020-08-29 at 10.29.39 PM.png

A GitHub repo link posted in Discord with a social media preview image Whoa!

Visually, that looks so much better!

The relevant information is still there (project name and description) but the right image can help your project stand out on social media. Gifs are supported, although animated Gifs may not be animated by default.

Additional information on this feature can be found in GitHub’s documentation.

Customizing your repository’s social media preview