Previous image on link of gitpages

Hi there, i’m using the gitpages to upload my project, but when i share this page on Facebook or whatsapp the link have a blank previous image. how can i set an image to work as previous image when i share it on social media?

1 Like

Hey Antonio,

To add a social media link to your GitHub repo, see here: How to Add a Social Media Image to Your Github Project Repository

To generate social media previews for your GitHub Pages site directly, you need to create tags for different websites. Check out this site, which will help you create them automatically:

Thanks for sharing Logan! i’ve made both changes, in the menu of gitpages and on the index.html page, but still don’t appear’s to work the previous image on social media.

and the code on :

<!-- Primary Meta Tags -->
<meta name="description" content="Portfólio Antonio Marcos Ramos">

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="">
<meta property="og:title" content="Portfólio Antonio Marcos Ramos">
<meta property="og:description" content="Portfólio Antonio Marcos Ramos">
<meta property="og:image" content="./icongithubportfolio.jpg" href="./icongithubportfolio.jpg">

It may take some time for this change to occur. Please give it a couple of hours and then try again.

First of all thanks for your attention, here on github the previous image works, but doesn’t work on social media… did you know how can i resolve?

It looks like the tags are set up correctly and are working in the meta tag testers I’ve checked:

That said, it could be that the images aren’t loading because of the ./ relative path you’re using. You might want to remove the ./ from these tags? That could be interfering with some sites loading your images correctly.