I want to add image when I share my website link
Asked Answered
T

3

5

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"/>
Tabanid answered 7/2, 2018 at 5:51 Comment(2)
Where would you like to share, is it facebook ?Daumier
Yes, I want to show image when I share my link in any platform. Right now it showing in whats app onlyTabanid
B
9

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">  
Bicuspid answered 7/2, 2018 at 6:37 Comment(6)
Working in whatsappTabanid
You can change the image size then try this code is working for meBicuspid
Please change image dimesionsBicuspid
But this showing default image. My image is differentTabanid
What image you want to show please add that image path in metaBicuspid
My be issue is with the facebook cache and solution is to refresh the facebook cache by going to the link. developers.facebook.com/tools/debug/og/object and pressing the button "Fetch New Scrape information". Hope it helpsBicuspid
D
2

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

Daumier answered 7/2, 2018 at 6:37 Comment(1)
Working in whatsappTabanid
A
0

Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.

Armillda answered 7/2, 2018 at 6:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.