Instafeed not returning squared photos

1.2k Views Asked by At

Using instafeed.js for Instagram feeds. I was using resolution: 'standard_resolution' and also disabled the Non Square Media option from the instagram client to get all the pictures squares on 612x612, however, this has stopped working out of the sudden and don't know where the issue is coming from.

1

There are 1 best solutions below

2
On

I had the same problem and I found a good solution here : https://humaan.com/blog/bigger-square-thumbnails-from-the-instagram-api/.

If you’re crawling the API with a script, you can do something like this in PHP to alter the thumbnail (where $post is your Instagram post object):

$thumbnail = str_replace('s150x150/', 's320x320/', $post->images->thumbnail->url);

Alternatively if you’re using JavaScript, you can do something like this:

var thumbnail = post.images.thumbnail.url.replace('s150x150/', 's320x320/');