What are the different image size formats available via Instagram API

£可爱£侵袭症+ 提交于 2019-12-05 08:10:22

问题


I noticed that in the Instagram API when you get an image back, it looks something like this:

http://distilleryimage6.s3.amazonaws.com/a0efb5b418b711e391bd22000a1fbf1d_7.jpg

And by changing the _7 to say _5 or _6 you can get different sizes. But I have also noticed that some of the other sizes are NOT always available. Does anyone have info on what sizes are available or can you point me to a resource in the Instagram API that goes into more detail on image sizes supported via the API? Thanks.


回答1:


The Instagram API should always return images in three sizes. All of which are square with side length of 150px, 306px and 612px. Videos are available at 480px square and 640px square resolutions.

"images": {
            "low_resolution": {
                "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_6.jpg",
                "width": 306,
                "height": 306
            },
            "thumbnail": {
                "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_5.jpg",
                "width": 150,
                "height": 150
            },
            "standard_resolution": {
                "url": "http://distillery.s3.amazonaws.com/media/2010/07/16/4de37e03aa4b4372843a7eb33fa41cad_7.jpg",
                "width": 612,
                "height": 612
            }
        },


来源:https://stackoverflow.com/questions/21394100/what-are-the-different-image-size-formats-available-via-instagram-api

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