Webpage og:image are cropped in facebook

岁酱吖の 提交于 2019-12-13 18:17:01

问题


I have og:image on my web page and image size 1200px by 630px. It gets cropped at on Facebook, what I miss!?

CODE

<meta property="og:title" content="Title" />
<meta property="og:url" content="http://www.url.com/" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://www.url.jpg" />
<meta property="og:description" content="description" />

回答1:


I had this same problem. You have probably edited the image several times and saved it with the same filename. The image is being cached on Facebook servers and Facebook does not refresh the image if the name remains the same. Rename your image and update your pages html then use Facebooks Object Debugger




回答2:


check if your picture's aspect ratio is 1.91:1, this aspect ratio is what facebook reccomends in order to avoid cropping.. check it out here https://developers.facebook.com/docs/opengraph/creating-custom-stories/#, Good luck and hope it helps!!




回答3:


In addition to following Facebook's best practices for image sizing, be wary of white backgrounds around the edge of your image. Facebook will automatically crop off white edges and use the cropped result. This will reduce the size and potentially change the dimensions of your image.

If you do need to pad out an image, you should use a colored or textured background to prevent cropping.



来源:https://stackoverflow.com/questions/24216838/webpage-ogimage-are-cropped-in-facebook

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