htmlfacebookseometa-tags

Where should I put an image so that i can use it as an og:image?


I want to use an image in <meta property="og:image" content="" /> but I have that image in my file.

I know that we cannot use relative link in this.

<meta property="og:image" content="img/socialImage.png" />

Then where should I put this image so that I can use it in meta tag. How I can use my image as URL?


Solution

  • Once your application is hosted on a domain and publicly accessible your image will become accessible via web crawlers. At this point it can be picked up inside the og:image meta. All you need to do is host the image publicly on your application and put the full URL in the meta tag. For example <meta property="og:image" content="https://example.com/socialImage.png" />