{"action":"created","issue":{"url":"https://api.github.com/repos/economist-components/component-picture/issues/2","labels_url":"https://api.github.com/repos/economist-components/component-picture/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/economist-components/component-picture/issues/2/comments","events_url":"https://api.github.com/repos/economist-components/component-picture/issues/2/events","html_url":"https://github.com/economist-components/component-picture/pull/2","id":117845463,"number":2,"title":"Serverside rendering should respond with a mobile-first picture","user":{"login":"sebinsua","id":152098,"avatar_url":"https://avatars.githubusercontent.com/u/152098?v=3","gravatar_id":"","url":"https://api.github.com/users/sebinsua","html_url":"https://github.com/sebinsua","followers_url":"https://api.github.com/users/sebinsua/followers","following_url":"https://api.github.com/users/sebinsua/following{/other_user}","gists_url":"https://api.github.com/users/sebinsua/gists{/gist_id}","starred_url":"https://api.github.com/users/sebinsua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebinsua/subscriptions","organizations_url":"https://api.github.com/users/sebinsua/orgs","repos_url":"https://api.github.com/users/sebinsua/repos","events_url":"https://api.github.com/users/sebinsua/events{/privacy}","received_events_url":"https://api.github.com/users/sebinsua/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-19T16:03:14Z","updated_at":"2015-11-20T10:28:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/economist-components/component-picture/pulls/2","html_url":"https://github.com/economist-components/component-picture/pull/2","diff_url":"https://github.com/economist-components/component-picture/pull/2.diff","patch_url":"https://github.com/economist-components/component-picture/pull/2.patch"},"body":"Previous to this the server was assuming that the client wanted the largest image first - or at least the first image it found with a particular `dppx` (in our case this was the largest image.)\r\n\r\n1. Server-rendering should respond with a mobile-first picture. We pick the smallest image, as we do not want mobile phones to start downloading the largest file size image; and we also expect this image to be a portrait.\r\n2. On `componentDidMount` we should immediately switch to the correct image even if we're on mobile. The reason I mention this is that previously to this PR the `'resize'` event was not being fired on page load on mobile and was instead being fired when you scrolled.\r\n\r\nAn assumption has been made that the current server-side fallback `dppx` of `1` is a sensible default. Other assumptions about expected behaviour described above.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/economist-components/component-picture/issues/comments/158350646","html_url":"https://github.com/economist-components/component-picture/pull/2#issuecomment-158350646","issue_url":"https://api.github.com/repos/economist-components/component-picture/issues/2","id":158350646,"user":{"login":"sebinsua","id":152098,"avatar_url":"https://avatars.githubusercontent.com/u/152098?v=3","gravatar_id":"","url":"https://api.github.com/users/sebinsua","html_url":"https://github.com/sebinsua","followers_url":"https://api.github.com/users/sebinsua/followers","following_url":"https://api.github.com/users/sebinsua/following{/other_user}","gists_url":"https://api.github.com/users/sebinsua/gists{/gist_id}","starred_url":"https://api.github.com/users/sebinsua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebinsua/subscriptions","organizations_url":"https://api.github.com/users/sebinsua/orgs","repos_url":"https://api.github.com/users/sebinsua/repos","events_url":"https://api.github.com/users/sebinsua/events{/privacy}","received_events_url":"https://api.github.com/users/sebinsua/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T10:28:43Z","updated_at":"2015-11-20T10:28:43Z","body":"@keithamus I removed the `filter`."}}