I want to add image when I share my website link

核能气质少年 提交于 2021-01-24 09:09:02

问题


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"/>

回答1:


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">  



回答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




回答3:


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.



来源:https://stackoverflow.com/questions/48656847/i-want-to-add-image-when-i-share-my-website-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!