Skip to main content

Customizing your repository's social media preview

You can customize the image displayed on social media platforms when someone links to your repository.

Until you add an image, repository links expand to show basic information about the repository and the owner's avatar. Adding an image to your repository can help identify your project across various social platforms.

Adding an image to customize the social media preview of your repository

Tip: Your image should be a PNG, JPG, or GIF file under 1 MB in size. For the best quality rendering, we recommend keeping the image at 640 by 320 pixels.

  1. On your enterprise, navigate to the main page of the repository.

  2. Under your repository name, click Settings. Repository settings button

  3. Under "Social preview," click Edit

    • To add a new image, click Upload an image....
    • To remove an image, click Remove image

    Social preview dropdown

About transparency

We support PNG images with transparency. Many communication platforms support a dark mode, so using a transparent social preview may be beneficial. The transparent image below is acceptable on a dark background; however, this may not always be the case.

When using an image with transparency, keep in mind how it may look on different color backgrounds or platforms that don't support transparency.

Tip: If you aren't sure, we recommend using an image with a solid background.

Social preview transparency