Yii2 extension for Yii2-instafeed Instagram javascript plugin, providing a simple way to add Instagram photos to your website.

This widget publishes assets and registers necessary code to run plugin. It also optionally renders a div container that plugin would automatically look for, to fill with thumbnails. You can control the name of a created javascript plugin variable by configuring widget id.

yii2 instagram feed




Add extension to your composer.json and update your dependencies as usual, e.g. by running composer update

Widget Configuration

  • $renderThumbnailDiv boolean whether to render <div id="instafeed"></div> container that plugin would look for by default
  • $pluginOptions array instafeed javascript plugin options. For more information refer to instafeed documentation

Sample Usage

The only thing you have to configure are plugin option. For example, to fetch images from your account, set the get, userId and accessToken options:

If, for convenience, you prefer to store application-wide configuration such as access token(s), client id(s) and user id(s) in an application component, you may find InstafeedConfig class useful, for example:

In an application config:

In a view:




Prakash S

Prakash S

I would like to introduce myself as a Software professional opting for the career in software industry. I'm Prakash S, a MCA graduate and trained as industry level practice for Software technology. Basically I am a PHP Developer but now days exploring more in HTML5, CSS, AngularJS and jQuery libraries.