0

I uploaded my code to a repository in Github and use Github Pages to show my website on the Internet. But when I copy the link and paste it to somewhere like a messenger on Facebook, it doesn't show an image inside. How can I do that?

Here is my pic. How can I add an image inside this link?

enter image description here

thinh6699
  • 39
  • 6

2 Answers2

0

You need to add relevant meta tags for preview images for your pages.

<link rel="image_src" href="image url" />

Check this https://andrejgajdos.com/how-to-create-a-link-preview/

Beshambher Chaukhwan
  • 1,418
  • 2
  • 9
  • 13
0

You need to include this in the head of the HTML code,

<meta property="og:image" content="http://euro-travel-example.com/thumbnail.jpg">

You can know more about this here

Nikhil Singh
  • 1,486
  • 1
  • 13
  • 24