<aside> 😀 这里写文章的前言: 分析这张图,是在Google的搜索结果中的,第一个结果右侧是没有图片显示的,而第二个结果右侧有图片显示,我们怎么可以让我们网站的搜索结果可以显示图片呢
</aside>

在 Google 搜索结果(SERP)右侧显示图片(通常称为缩略图或Rich Snippet Image),并不是在后台点击一个简单的开关就能实现的,而是需要通过SEO 优化和技术配置来向 Google 发出强烈的信号,告诉它这张图片是该页面的核心内容。
以下是实现这一效果的核心方法,按重要性排序:
这是最直接告诉 Google “这张图片代表这个页面”的方式。您需要在页面代码中添加 JSON-LD 格式的结构化数据。
如果您的页面是文章或通用页面,建议使用 Article 或 WebPage 类型,并明确指定 image 属性。
代码示例 (添加到 <head> 部分):
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "您的页面标题",
"image": [
"https://yourwebsite.com/path/to/image.jpg"
],
"author": {
"@type": "Person",
"name": "作者名"
},
"publisher": {
"@type": "Organization",
"name": "网站名称",
"logo": {
"@type": "ImageObject",
"url": "https://yourwebsite.com/logo.jpg"
}
}
}
</script>
<meta> 标签指定缩略图Google 同时也支持一种更简单的 Meta 标签来指定缩略图。
Thumbnail Meta Tag: 直接告诉 Google 缩略图在哪里。HTML
<meta name="thumbnail" content="https://yourwebsite.com/path/to/image.jpg" />
Open Graph 标签 (og:image): 虽然这是给社交媒体(如 Facebook, Twitter)用的,但 Google 经常会将其作为备选方案读取。HTML
<meta property="og:image" content="https://yourwebsite.com/path/to/image.jpg" />
即使加了代码,如果图片质量不达标,Google 也不会抓取。