Hi,
I want to get the Facebook Cover Photo on my website.
Which should be 850x315 pixels, but not the full image that I uploaded.
I can get image from Facebook, for example:
"cover": {
"cover_id": "10152513030211729",
"source": "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/t1/s720x720/12714_10152513030211729_1664524928_n.jpg",
"offset_y": 62,
"offset_x": 0
}
Where “source” is the full image.
I would like to ask, how can I get exactly the cropped image shown in Facebook like this?
Many thanks.
1 Like
ralphm
February 19, 2014, 6:48am
2
Why not just crop it yourself in Photoshop?
Because I have a list of Facebook shops,
Hence I need a dynamic way to show the photo…
Rubble
February 19, 2014, 7:58am
4
You could do it with Imagemagick and probably Imagick:
exec("convert https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/t1/s720x720/12714_10152513030211729_1664524928_n.jpg -crop 850x315+0+62 output.jpg");
Ah just noticed there might be a problem with the https instead of http.
Rubble:
You could do it with Imagemagick and probably Imagick:
exec("convert https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/t1/s720x720/12714_10152513030211729_1664524928_n.jpg -crop 850x315+0+62 output.jpg");
Ah just noticed there might be a problem with the https instead of http.
This is a good tool… Thanks for your reply.
However, i am finding the way to solve this problem using CSS…
Because i want to handle it through Web directly,but not save it in file system…
Thanks again.
1 Like
ralphm
February 19, 2014, 8:56pm
6
You could perhaps play around with the CSS clip property .