Facebook crops open graph image in to a square

我是研究僧i 提交于 2019-11-30 14:38:14

问题


I'm trying to create a custom open graph story to Facebook but I'm having some trouble getting the og:image to show properly. I'm using a 1200*630 sized image as recommended here and here but on my timeline it gets cropped in to a square from the left edge of the image. It also shows as a square in the story preview though this time it's cropped from the center.

How can I get the image to show in the correct aspect ratio and size? Is it just the test environment to blame or do I need to add something on my server side? I've already tried to use the meta tags width and height with no success.

Currently the tag looks like this:

<meta property="og:image" content="http://www.linktomyimage/1200x630pixels.png" />


回答1:


Open Graph Stories Images appear in a square format. Image ratios for these apps should be 600 x 600 px.

from Facebook sharing best practices




回答2:


Be sure to have your image at an 1.91:1 aspect ratio. Facebook also notes that images for game app stories appear square, but I'm not sure from your information above if that applies to your situation. GL




回答3:


It shows the 1200 X 630 image on retina screens only.



来源:https://stackoverflow.com/questions/20537676/facebook-crops-open-graph-image-in-to-a-square

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!