{"action":"created","issue":{"url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/321","labels_url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/321/comments","events_url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/321/events","html_url":"https://github.com/stevenschobert/instafeed.js/issues/321","id":108505053,"number":321,"title":"Display images only after resizing","user":{"login":"tlahitte","id":5720766,"avatar_url":"https://avatars.githubusercontent.com/u/5720766?v=3","gravatar_id":"","url":"https://api.github.com/users/tlahitte","html_url":"https://github.com/tlahitte","followers_url":"https://api.github.com/users/tlahitte/followers","following_url":"https://api.github.com/users/tlahitte/following{/other_user}","gists_url":"https://api.github.com/users/tlahitte/gists{/gist_id}","starred_url":"https://api.github.com/users/tlahitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlahitte/subscriptions","organizations_url":"https://api.github.com/users/tlahitte/orgs","repos_url":"https://api.github.com/users/tlahitte/repos","events_url":"https://api.github.com/users/tlahitte/events{/privacy}","received_events_url":"https://api.github.com/users/tlahitte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-27T00:44:35Z","updated_at":"2015-10-28T14:02:37Z","closed_at":null,"body":"Hello everybody,\r\nIt has been really easy to use instafeed for the moment and to see my Instagram pictures display on my website. So First of all, I would like to thank you about this amazing tool ! \r\n\r\nUnfortunately I need to resize all of my pictures before I displayed them, for this, I'm using a JQuery function, who grab all my pictures, and made their size responsive (see code below)\r\n\r\nThe only problem that I experience, is that the resizing function arrived a few seconds after my pictures with the wrong measurement has been display. So the job is done but for the first second on my website the visitor can see full size picture before the resizing function start his job.\r\n\r\nHere is the Javascript code:\r\n```javascript\r\n$(document).ready(function(){\r\n\r\n  var limit = 12, \r\n      tagName = 'pqds', // set here your specific hashtag\r\n      count = 1;\r\n\r\n  var feed = new Instafeed({\r\n    get: 'user',\r\n    userId: ********,\r\n    clientId: '***************',\r\n    accessToken: '**********************',\r\n    limit: 50,\r\n    resolution: 'standard_resolution',\r\n    template: '<a class=\"visuel\" href=\"https://instagram.com/\"><img src=\"{{image}}\" /></a>',\r\n    filter: function(image) {\r\n        return count <= limit && image.tags && image.tags.indexOf(tagName) >= 0 && ++count;\r\n    }\r\n    });\r\n    feed.run();\r\n});\r\n\r\n  $( window ).load(function() {\r\n  instaSize();\r\n  });\r\n\r\n  $( window ).resize(function() {\r\n    instaSize();\r\n  });\r\n\r\nfunction instaSize()\r\n{\r\n  windowSizeWidth = $(window).width();\r\n$(\"#instafeed a img\").css('width', windowSizeWidth/4+'px');\r\n$(\"#instafeed a img\").css('height', windowSizeWidth/4+'px');\r\n}\r\n\r\n```\r\nThank you very much\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/comments/151855075","html_url":"https://github.com/stevenschobert/instafeed.js/issues/321#issuecomment-151855075","issue_url":"https://api.github.com/repos/stevenschobert/instafeed.js/issues/321","id":151855075,"user":{"login":"WeOne13","id":15362983,"avatar_url":"https://avatars.githubusercontent.com/u/15362983?v=3","gravatar_id":"","url":"https://api.github.com/users/WeOne13","html_url":"https://github.com/WeOne13","followers_url":"https://api.github.com/users/WeOne13/followers","following_url":"https://api.github.com/users/WeOne13/following{/other_user}","gists_url":"https://api.github.com/users/WeOne13/gists{/gist_id}","starred_url":"https://api.github.com/users/WeOne13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WeOne13/subscriptions","organizations_url":"https://api.github.com/users/WeOne13/orgs","repos_url":"https://api.github.com/users/WeOne13/repos","events_url":"https://api.github.com/users/WeOne13/events{/privacy}","received_events_url":"https://api.github.com/users/WeOne13/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T14:02:37Z","updated_at":"2015-10-28T14:02:37Z","body":"Hi dude,,\r\n\r\nI try your code and modify like this, and work perfectly.\r\nHope it work with you too.\r\n\r\n```javascript\r\n$(document).ready(function(){\r\n\r\n \tvar windowSizeWidth = $(window).width();\r\n  \r\n  var limit = 12, \r\n      tagName = 'pqds', // set here your specific hashtag\r\n      count = 1;\r\n\r\n  var feed = new Instafeed({\r\n    get: 'user',\r\n    userId: ********,\r\n    clientId: '***************',\r\n    accessToken: '**********************',\r\n    limit: 50,\r\n    resolution: 'standard_resolution',\r\n    after: function () {\r\n\t\t\t$(\"#instafeed a > img\").css('width', windowSizeWidth/4+'px');\r\n\t\t\t$(\"#instafeed a > img\").css('height', windowSizeWidth/4+'px');\r\n   \t}, \r\n    template: '<a class=\"visuel\" href=\"https://instagram.com/\"><img src=\"{{image}}\" /></a>',\r\n    filter: function(image) {\r\n        return count <= limit && image.tags && image.tags.indexOf(tagName) >= 0 && ++count;\r\n    }\r\n    });\r\n    feed.run();\r\n});\r\n```\r\n\r\nThanks"}}