I'd like to ask if there is any way to get thumbnail image for media returned from Instagram Graph API? I can get an image URL by using following endpoint: /{InstagramUserId}/media?fields=media_url
However it only returns one size. Old Instagram API returned various sizes like low_resolution
, thumbnail
, standard_size
. Is it possible to get similar result by using Instagram Grahp API?
Those familiar with the API would know that Instagram’s thumbnails are served at a rather small size of 150×150 which is alright in some cases, but if you need a larger thumbnail size a 150×150 image scales up very poorly. Here’s the images attribute in the API response for a recent Instagram post we did:
The Instagram Graph API allows Instagram Professionals — Businesses and Creators — to use your app to manage their presence on Instagram.
The index of the thumbnail, usually 0-4. If there is a custom thumbnail, its index is 0. The size of the thumbnail requested. This can be one of the standard sizes listed below or a custom size. You can directly retrieve the content of the thumbnail by requesting the content property of the thumbnail.
If you are building an app for consumers or you only need to get an app user's basic profile information, photos, and videos, consider the Instagram Basic Display API instead. The API is built on the Facebook Graph API.
After searching for some time to a solution i finally found one.
So, include in the fields
query string the permalink
field and it should give as following (Sorry, for using Kim Kardashian as an example):
https://www.instagram.com/p/CAYDz52gSLh
then append this at the end media?size=t
or simply media
like this:
https://www.instagram.com/p/CAYDz52gSLh/media?size=t
media?size=t
will give a 150x150 px imagemedia?size=m
will give a 320x320 px imagemedia?size=l
will give a 1080x1080 px imageIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With