LinkedIn Open Graph 显示的错误图片

Wrong image displayed by LinkedIn Open Graph

我正在尝试在我的 LinkedIn 个人资料上分享 http://gbgtechweek.com/

我有这个元标记:

<meta property="og:image" content="http://gbgtechweek.com/img/gbgtechweek_img.png" />

但是,LinkedIn 选择显示页面中的另一张图片 (http://gbgtechweek.com/img/goteborg00.jpg)

这是尺寸的问题吗,我该如何解决?

我尝试使用“?!”进行更新最后,LinkedIn 重新获取 Open Graph 数据,但没有成功。

有什么解决办法吗?

LinkedIn(令人震惊和悲伤!)only use official partners from http://embed.ly/providers 'projects' 在您的个人资料上。 Open Graph 仅适用于 LinkedIn feed/sharing 更新区域。

否则,您可以将各种文件类型上传到功能中,但无法明确告诉 LinkedIn 在个人资料上使用哪个图像。

Embed.ly pick up open graph information on your site, but they don't prioritize the OG information. In fact, Embed.ly wrote a blog post that essentially scoffs at the widespread use of Open Graph tags 用于共享以及用户和大型网站如何不信任他们。

编辑:

回复评论:

可以 重新调整 embed.ly 上的内容,例如,在将网站添加到您的个人资料时禁用 background-image,或者切换 background-image 到所需的时间足以让您在 LinkedIn 上获得所需的效果。这不是一个有保证的修复,因为 LinkedIn 可能会在以后(任何时间!)重新缓存该项目,这会将其设置回您的 background-image.

这恰好发生在我身上,原因是 og:image 标签中图像的文件名中有重音符号 Unicode 字符(例如,áé) . LinkedIn 必须跳过包含这些字符的文件名,因为它正在选择页面上的另一张图片。

我将图像文件名更改为没有 Unicode 字符的文件名,它提取了正确的图像。

LinkedIn 可以从名为“oEmbed”的标签中获取图像,尽管存在 og:image 标签。

这里有一个例子:

<link rel="alternate" type="application/json+oembed" href="https://www.s-sols.com/api/oembed/1.0/embed?url=https%3A%2F%2Fwww.s-sols.com%2Fhow-make-multipage-website">
而这个JSON内容包含普通图片。

我在 WordPress 中遇到过这个问题。解决方法是将此标记删除为 described here:

remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);
remove_action('wp_head', 'wp_oembed_add_host_js');
remove_action('rest_api_init', 'wp_oembed_register_route');
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);

您可以尝试在此处刷新 linkedin 缓存(对于特定 link):

https://www.linkedin.com/post-inspector/