Facebook timeline wallpost image cropped after like

走远了吗. 提交于 2020-01-04 02:16:11

问题


I have a Facebook Like button on my website, for a half a year now. Used OG tags to visualize the like. Everything tested thoroughly, everything showed up well on the 'basic' wall, as well as the 'timeline' wall as well in the news feed.

But al of a sudden, when someone likes the page, the image is being cropped on the timeline wall. The original image is 200px x 200px, because the Facebook developer tool mentioned these dimensions.

I don't think it is a image dimension issue, because a 96x96 image is also being cropped. With cropped i mean that the top and bottom part of the logo are cut-off.

Now i have an old post (march 2012) where the image was not cropped and a post (few days ago) where the image is cropped. The difference between those two is the url of the image:

One where the original image is OK: https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCAhHvmadrTku6h&w=155&h=114&url=http%3A%2F%2Fwww.poobies.fr%2Fsite%2Fimg%2Fsocialmedia%2Fsocialmedia_logo_fr.png

And one where the image is cropped: https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCAhHvmadrTku6h&w=155&h=114&url=http%3A%2F%2Fwww.poobies.fr%2Fsite%2Fimg%2Fsocialmedia%2Fsocialmedia_logo_fr.png&cfs=1

see the parameter &cfs=1?

Is there some option or some OG parameter that makes sure that the image is not being cropped by Facebook?

Thank You


回答1:


I did some research and found the problem is most likely a combination of using a PNG and having an image with a white background.

Here's my original PNG (90 x 90 px) with a white background that gets cropped:

  • logo2.png

Then the same PNG with a darkened background that uses the full image size

  • logo2dark.png

JPGs and GIFs with white BGs worked fine

  • logo2.gif
  • logo2.jpg

As a side note, Facebook didn't like when I served the images through https.

It would be nice if Facebook would document these changes they make, but alas.




回答2:


I've noticed this too. I think it's just Facebook playing around with the way it displays images on newsfeeds / timelines. My images used to be cropped from the slides but all of a sudden Facebook stopped cropping then. It was either a bug or a temporary change that was later reverted.

You cannot set the dimensions of og:image manually.



来源:https://stackoverflow.com/questions/11032484/facebook-timeline-wallpost-image-cropped-after-like

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