提供og:图像在Facebook linter中不够大

时间:2013-03-11 19:01:28

标签: facebook opengraph facebook-opengraph

我在我的网站上正确设置og:image,facebook linter看到它(facebook debugger)但是,它说图像应该至少为200x200,而情况并非如此,我的图像是250x250 {{ 3}}

可能导致此问题的原因是什么?这可能与Cloudfront有关吗?

Edit: I got around it by switching from this image to another image which is a 
jpg image, but still I couldn't find the cause for the problem since the image
looks fine.

6 个答案:

答案 0 :(得分:27)

发生在我身上。我只使用了meta og:image标签。我在头部添加了以下内容

<link rel="image_src" type="image/jpeg" href="img_path" />

它解决了我的问题。

答案 1 :(得分:5)

此处的主题非常有用:og:image Open Graph Warnings image size

通常,FB的解析器更喜欢(1)以100和(2)方格式的倍数测量的图像。

答案 2 :(得分:1)

尝试在其他图像编辑器中重新保存图像。有时,图像元数据可以指示图像的大小与实际大小不同。使用不同的程序(在我的情况下,我使用MS Paint)重新保存它可以使元数据更加友好。

答案 3 :(得分:0)

我的自定义Web服务器ServeRick遇到了同样的错误,解决方案出乎意料的是发送带有图像的Content-Length标题..没有这个标题facebook不接受任何我的og:图像链接

答案 4 :(得分:0)

我的图像路径中有空格。

就像我的图片路径是http://example.com/ jodha akbar /image.jpg

如果您在上面观察。 jodha akbar 目录中有空格。

Facebook并没有因为这个特殊角色而走上正轨。

我添加了一个PHP str_replace函数。它对我有用。

str_replace(" ","%20",$image_path)

答案 5 :(得分:0)

将相同的图片从JPG 转换为 PNG 为我完成了工作。

相关问题