FB Profile Pic总是返回为“.jpg”? [英] FB Profile Pic always returned as ".jpg"?

查看:121
本文介绍了FB Profile Pic总是返回为“.jpg”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



发现奇怪的是,无论我将图像上传到(gif,bmp,tiff或jpg) ),我致电 https://graph.facebook.com/507988137/picture?type=大的(我的图片)总是返回一个jpg。



有谁知道我是否可以假设他的图像总是jpg?我正在使用php get_file_contents来绘制图像&不想嗅探测试他们的各种格式。

解决方案

Facebook不保存您上传的原始图像。相反,它将所有上传的图像转换为4种不同大小的jpg,以支持所有可能显示图像的不同地方。



如果您有兴趣,Facebook基本上具有事实上,我已经阅读过几次,他们是世界上最大的图像托管服务。这个Facebook博客文章中的更多细节, Facebook照片基础设施


Trying to pull user images via the Facebook Social Graph.

Finding it odd that no matter what I upload the image as (gif, bmp, tiff, or jpg), my call to https://graph.facebook.com/507988137/picture?type=large (my pic) always returns a jpg.

Does anyone know if I'm OK assuming that his image is always a "jpg"? I'm using php get_file_contents to pull the images & would prefer not having to sniff test them for various formats.

解决方案

Facebook doesn't save the original image that you upload. Instead it converts all uploaded images to jpgs of 4 different sizes to support all the different places where the image may be displayed.

In case you are interested, Facebook basically has this down to a science, in fact, I've read several times that they are the largest image hosting service in the world. More details within this Facebook blog post, Facebook Photos Infrastructure

这篇关于FB Profile Pic总是返回为“.jpg”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆