OGKit

规则 / og-image-relative-url · 规则集 2026-07

og:image 使用相对路径

错误og-image-relative-url
规则 IDog-image-relative-url
严重程度错误
分类图片
平台全部平台
需要人工处理

这是什么

og:image 使用相对路径。OGKit 规则 og-image-relative-url(错误)。该 ID 是文档网址与 CI --disable 键使用的公开 API,请勿改名。

以下搜索词应指向本页:

  • og:image is a relative path
  • relative og:image
  • og:image relative URL

为什么重要

社交抓取器解析相对图片 URL 的方式不一致,很多会直接丢弃图片。

受影响的平台

全部 OGKit 平台资料,包括使用这些标签的主要社交、聊天与搜索爬虫。

各平台的爬虫预算与字段优先级详见平台行为参考

如何复现

  1. Read og:image content. If it starts with `/` or lacks a scheme, this fires.
  2. Example bad value: `/images/share.jpg`

如何修复

使用包含协议和主机的绝对 URL,例如 https://cdn.example.com/og.jpg。

修复示例:

<meta property="og:image" content="https://cdn.example.com/og/share.jpg" />