大网数据广告活动
网站运营与故障问答

LinkedIn social sharing image not showing up when using og:image tag

· 52CE 我爱测

For some reason, when I share a URL to my blog post on LinkedIn, the image specified in the og:image tag does not appear in the share LinkedIn post. URL shared: https://robertcooper.me/post/feature-flags og:image meta tag found i…

问题原文

原帖链接 · Robert Cooper · CC BY-SA 4.0

For some reason, when I share a URL to my blog post on LinkedIn, the image specified in the og:image tag does not appear in the share LinkedIn post.

URL shared: https://robertcooper.me/post/feature-flags

og:image meta tag found in the page's head:

<meta property="og:image" content="https://www.robertcooper.me/api/og-image/Building%20with%20feature%20flags?readTime=6">

The LinkedIn post inspector confirms that the image won't show up when shared: https://www.linkedin.com/post-inspector/inspect/https:%2F%2Frobertcooper.me%2Fpost%2Ffeature-flags


Testing things out on other websites, I looked at how sharing this URL looks like: https://css-tricks.com/

This shows up correctly on LinkedIn (as confirmed by the LinkedIn post inspector: https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fcss-tricks.com%2F).

已采纳解答

原帖链接 · Zhaph - Ben Duguid · CC BY-SA 4.0

Your image request is actually returning a 308 response, directing to:

https://robertcooper.me:443/api/og-image/Building with feature flags?readTime=6

Note the addition of the port and the %20 s being returned to spaces.

Also, I seem to recall in the past that LinkedIn got upset if the og:image path didn't look like a file (e.g. ending in .jpg or .png).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2021-05-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。