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.
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.
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.
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.