为WhatsApp的链接分享提供一个图像

当我们分享这样的链接时,如何在我们的网站中加入图片以显示在WhatsApp中?

![在此输入图片描述][1]

我有同样的问题,问题在于图片的大小。Whatsapp不支持大小超过300KB的图片。

所以在Whatsapp上显示图片最重要的属性是。

<meta property="og:image" content="url_image">

而且要显示的图片的大小必须小于300KB

如果问题仍然存在,也请阅读这个类似问题的答案。

评论(3)

我猜Whatsapp中没有白名单,因为我找到了一个对我有用的解决方案。具体做法如下。 插入3个元标签。

<meta property="og:image" content="http://yourimage_with_complete_URL.png"/>  
<meta property="og:title" content="Your Title"/>  
<meta property="og:description" content="Your description."/>  

你的图片必须是.png格式,尺寸为600x600px,必须命名为'logo-yoursite.png&#39。 (有一次,我就像这样工作)

别忘了在你的网站上插入whatsapp的链接。

<a href='whatsapp://send?text=Text to send withe message: http://www.yoursite.com'>whatsApp</a>

做到这一点,你就会做得很好!

评论(2)

如果你想在别人在WhatsApp上分享的你的网站的网址旁边放一张图片,你必须在网址链接的页面上放一个元标签,像这样。

<meta property="og:image" content="http://unrestrictedstock.com/wp-content/uploads/Unrestricted-Stock-Small.png"/>
评论(6)