Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"/>
like image 555
priyapatel Avatar asked Jan 02 '23 20:01

priyapatel


2 Answers

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">  
like image 138
developerme Avatar answered Jan 05 '23 19:01

developerme


You can try following ,

<meta property="og:image" content="https://www.telotrovo.it/wp-content/uploads/2016/02/siteimage.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="200">
<meta property="og:image:height" content="200">

Image width should specify, minimum 200 X 200 , you can change it though

like image 29
Shajibur Rahman Avatar answered Jan 05 '23 18:01

Shajibur Rahman