规则 / og-image-content-type-mismatch · 规则集 2026-07
图片 Content-Type 与实际格式不符
| 规则 ID | og-image-content-type-mismatch |
|---|---|
| 严重程度 | 错误 |
| 分类 | 图片 |
| 平台 | 全部平台 |
| 需要人工处理 | 否 |
这是什么
图片 Content-Type 与实际格式不符。OGKit 规则 og-image-content-type-mismatch(错误)。该 ID 是文档网址与 CI --disable 键使用的公开 API,请勿改名。
以下搜索词应指向本页:
Image Content-Type does not match actual formatcontent-type mismatch og:imagewrong MIME type image
为什么重要
错误的 Content-Type 或扩展名会让部分抓取器拒绝有效图片。
受影响的平台
全部 OGKit 平台资料,包括使用这些标签的主要社交、聊天与搜索爬虫。
各平台的爬虫预算与字段优先级详见平台行为参考。
如何复现
- Compare the HTTP Content-Type of the image URL with the actual file signature (magic bytes).
- Serving JPEG as image/png (or vice versa) fails this check.
如何修复
以与文件特征一致的 image/jpeg、image/png、image/webp 或 image/gif 提供图片。
没有适用于所有情况的单一模板;请使用 OGKit 问题中的实测值与预期值。