Search code examples
htmlfacebookgithubmeta-tags

Image not showing while sharing URL on other platform


<meta property="og:image" content="https://vickygupta16.github.io/Images/VickyGupta.jpg">
<meta property="og:image:type" content="image/jpg" />
<meta property="og:image:width" content="240" />
<meta property="og:image:height" content="240" />
<meta property="og:image:alt" content="Display Picture" />

I am not able to view the image that should be displayed while sharing URL on social media platform.

I tried different width and height and updated my github repo and still didn't got the image while sharing URL.

I know i am missing a simple step and solution can be very simple, but i am not able to solve it.


Solution

  • Check out the following Facebook recommendations for images:

    For high-resolution devices, use images of at least 1,200 x 630 pixels. To publish Pages with links with large images, use images with a size of at least 600 x 315 pixels.

    We have changed the publication of the Page with links: now the aspect ratio of the images is the same for News Feed on PC and on mobile devices. Try to ensure a 1.91: 1 aspect ratio so that the image in the News Feed is not cropped.