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(); });
post image video instagram instafeedjs
Staffan estberg
source share