Instafeed: skip retrieving video type entries from feed

I want to skip all entries such as videos from the feed that I collect through the Instafeed JS plugin. Read from several other messages that the filter setting will allow it, but if I applied it (see below), I get only 2 images instead of 5. 1 of these 5 is a video type, and the rest are image types. Not sure what is going on here?

var loadButton = document.getElementById('instafeed-loadmore'); var feed = new Instafeed({ get: 'user', type: 'image', limit: '5', sortBy: 'most-recent', resolution: 'standard_resolution', userId: '', accessToken: '', template: '<div><a href="#" data-modal="instafeed-expand" data-caption="{{caption}}" data-image="{{image}}"><img src="{{image}}" data-etc=""></a></div>', filter: function(image) { return image.type === 'image'; }, after: function() { if (!this.hasNext()) { loadButton.setAttribute('disabled', 'disabled'); } }, }); loadButton.addEventListener('click', function() { feed.next(); }); 
+7
post image video instagram instafeedjs
source share
2 answers

Perhaps removing the permission setting should help. Also I do not think that

 type: 'image', 

is a valid argument. I can not find it in the instafeed documentation.

+2
source share

TRy after

 var feed = new Instafeed({ get: "user", userId: "xxxx", accessToken: "xxxx", filter: function(image) { if (image.type === "image") { return false; } return true; } }); feed.run(); 
0
source share

All Articles