Search code examples
wordpressimagemeta

I want to add image when I share my website link


enter image description hereI have added image in my website. I want to show that image when I share my website link.It is showing only in whatsapp not in facebook and skype.

My website link is: https://www.telotrovo.it/

I have tried this code:

<meta property="og:image:secure_url" content="https://www.telotrovo.it/wp-content/uploads/2016/02/siteimage.jpg"/>

<meta property="og:image" content="http://www.telotrovo.it/wp-content/uploads/2016/02/siteimage.jpg"/>


Solution

  • Facebook,Skype and others are using Open Graph Protocol to get those. I have these in one of my sites:

    <meta property="og:title" content="Site Title" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://my.website.com" />
    <meta property="og:image:url" content="http://my.website.com/images/thumb.png" />
    <meta property="og:description" content="Site description" />
    

    And the image displayed as the link preview on Skype and Facebook is the thumb image specified in og:image:url.

    These four should be present in your tag. Also make sure you add the XML NameSpace to the tag:

    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:og="http://ogp.me/ns#"
          xmlns:fb="https://www.facebook.com/2008/fbml">