用于社交分享的默认网站图片 [英] Default website image for social sharing

查看:115
本文介绍了用于社交分享的默认网站图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法设置在Facebook上分享我的网站时出现的默认图像?我注意到,Facebook通常会从站点中获取第一个图像作为缩略图。

解决方案

您需要设置Facebook图像元标记:

 < meta property =og:imagecontent =http://example.com/ logo.jpg> 
< meta property =og:image:typecontent =image / png>
< meta property =og:image:widthcontent =1024>
< meta property =og:image:heightcontent =1024>

有关详细信息,请查看 docs


Is there any way to set a default image that appears when I share my website on Facebook? I've noticed that Facebook usually fetches the first image from the site to use as a thumbnail.

解决方案

You need to set the facebook image meta tag:

<meta property="og:image" content="http://example.com/logo.jpg">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1024">
<meta property="og:image:height" content="1024">

For more info check the docs

这篇关于用于社交分享的默认网站图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆