In order to change the repository's image on social media, it is recommended to change it using settings and not by adding images at the end. Sometimes it may not be rendered on all browsers properly. The social media preview setting is available when we go to the settings for a GitHub repository. We have the option of uploading a (1280×640px image for the preview.
In order to change the repository's image on social media, it is recommended to change it using settings and not by adding images at the end. Sometimes it may not be rendered on all browsers properly. The social media preview setting is available when we go to the settings for a GitHub repository. We have the option of uploading a (1280×640px image for the preview.
More information here: https://docs.github.com/en/github/administering-a-repository/customizing-your-repositorys-social-media-preview
The preview image may not work for private repositories