问题描述
我的网站上有一个Facebook赞按钮,已有半年了。使用OG标签来可视化。一切都经过彻底的测试,所有内容都在基本墙上以及时间轴墙以及新闻Feed中都表现得很好。
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.
但突然之间,当有人喜欢这个页面时,图像会在时间轴墙上被裁剪。原始图像是200px x 200px,因为Facebook开发人员工具提到了这些维度。
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.
我不认为这是图像尺寸问题,因为96x96图像也被裁剪。裁剪后我的意思是标志的顶部和底部都被截断了。
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.
现在我有一个旧帖子(2012年3月)没有裁剪图像一个帖子(几天前)裁剪图像的地方。这两者之间的差异是图像的网址:
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
参见参数&a mp; cfs = 1?
see the parameter &cfs=1?
是否有一些选项或一些OG参数可以确保Facebook不会裁剪图像?
Is there some option or some OG parameter that makes sure that the image is not being cropped by Facebook?
谢谢
推荐答案
我做了一些研究,发现问题很可能是使用了PNG并且图像带有白色背景。
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.
这是我的原始PNG(90 x 90像素),白色背景被裁剪:
Here's my original PNG (90 x 90 px) with a white background that gets cropped:
- logo2.png
然后使用完整图像尺寸的背景变暗的相同PNG
Then the same PNG with a darkened background that uses the full image size
- logo2dark.png
白色BG的JPG和GIF工作正常
JPGs and GIFs with white BGs worked fine
- logo2.gif
- logo2.jpg
作为附注,当我通过https提供图像时,Facebook不喜欢。
As a side note, Facebook didn't like when I served the images through https.
如果Facebook能够记录他们所做的这些改变,那将会很好。但是,唉。
It would be nice if Facebook would document these changes they make, but alas.
这篇关于Facebook时间线wallpost图像裁剪后喜欢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!