Skip to content

Options Reference

Steven Schobert edited this page Apr 27, 2020 · 5 revisions
Key Default Value Valid types Description
accessToken null String, Function Required. The Instagram access token, either as a string, or a function which returns a string
accessTokenTimeout 5000 Number If you pass a function to accessToken, how long to wait for a response.
after null Function A callback function called when images have been added to the page.
apiTimeout 5000 Number How long to wait for a response from the Instagram API
debug false Boolean Set to true to log debugging information to the console
error null Function A callback function called when an error occurs during processing.
filter null Function A function used to exclude images from your results. The function will be given the image data as an argument, and expects the function to return a boolean.
limit null Number Display a maximum of this many posts
mock false Boolean Set to true fetch data without inserting images into DOM. Use with success callback.
render null Function Provide a custom function used to render the item from the image data. Should provide HTML ready to be inserted into the document.
sort null Function A custom function to sort the media, rather than the default 'most recent' sorting
success null Function A callback function called when Instagram API has returned valid data, before any transforming or rendering is done.
target 'instafeed' String, DOM Element Either the ID or the DOM element itself where you want to add the images.
template '<a href="{{link}}"><img title="{{caption}}" src="{{image}}" /></a>' String A mustache template used to produce HTML for the document. See Templating.
templateBoundaries ['{{','}}'] Array The starting and ending delimiters for your templating format
transform null Function A function used to transform the image data before it is rendered. See Data Transformations.
Clone this wiki locally