{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9451","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9451/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9451/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9451/events","html_url":"https://github.com/gatsbyjs/gatsby/pull/9451","id":374507221,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MTk0NjI1","number":9451,"title":"Add IO and object-fit/object-position polyfills to gatsby-image","user":{"login":"ooloth","id":625364,"node_id":"MDQ6VXNlcjYyNTM2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/625364?v=4","gravatar_id":"","url":"https://api.github.com/users/ooloth","html_url":"https://github.com/ooloth","followers_url":"https://api.github.com/users/ooloth/followers","following_url":"https://api.github.com/users/ooloth/following{/other_user}","gists_url":"https://api.github.com/users/ooloth/gists{/gist_id}","starred_url":"https://api.github.com/users/ooloth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooloth/subscriptions","organizations_url":"https://api.github.com/users/ooloth/orgs","repos_url":"https://api.github.com/users/ooloth/repos","events_url":"https://api.github.com/users/ooloth/events{/privacy}","received_events_url":"https://api.github.com/users/ooloth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-26T18:56:59Z","updated_at":"2018-10-26T19:11:39Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9451","html_url":"https://github.com/gatsbyjs/gatsby/pull/9451","diff_url":"https://github.com/gatsbyjs/gatsby/pull/9451.diff","patch_url":"https://github.com/gatsbyjs/gatsby/pull/9451.patch"},"body":"This PR addresses [#4021](https://github.com/gatsbyjs/gatsby/issues/4021) by:\r\n\r\n1. Dynamically implementing the `intersection-observer` in browsers that need it to enable lazy loading (currently Safari and IE)\r\n2. Dynamically implementing the `object-fit-images` polyfill in browsers that need it to enable the `object-fit` and `object-position` CSS properties (currently IE).\r\n\r\nIt also updates the `gatsby-image` README with the following changes in usage:\r\n\r\n1. `gatsby-image` must now be explicitly added to `gatsby-config` to enable both polyfills (or the new `gatsby-browser.js` that imports the polyfills won't be picked up).\r\n2. The new `objectFit` and `objectPosition` props must be used to pass these CSS declarations to the `<img />` element  (instead of `imgStyle`) or the `object-fit-images` polyfill won't work. This is necessary because of the way `object-fit-images` duplicates these property declarations in a custom `font-family` declaration that triggers the polyfill.\r\n\r\nLet me know if I missed anything!\r\n\r\n(Apologies for some of the formatting changes to `index.js` below that were triggered by Prettier.)"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/433514085","html_url":"https://github.com/gatsbyjs/gatsby/pull/9451#issuecomment-433514085","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9451","id":433514085,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzUxNDA4NQ==","user":{"login":"ooloth","id":625364,"node_id":"MDQ6VXNlcjYyNTM2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/625364?v=4","gravatar_id":"","url":"https://api.github.com/users/ooloth","html_url":"https://github.com/ooloth","followers_url":"https://api.github.com/users/ooloth/followers","following_url":"https://api.github.com/users/ooloth/following{/other_user}","gists_url":"https://api.github.com/users/ooloth/gists{/gist_id}","starred_url":"https://api.github.com/users/ooloth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooloth/subscriptions","organizations_url":"https://api.github.com/users/ooloth/orgs","repos_url":"https://api.github.com/users/ooloth/repos","events_url":"https://api.github.com/users/ooloth/events{/privacy}","received_events_url":"https://api.github.com/users/ooloth/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T19:11:39Z","updated_at":"2018-10-26T19:11:39Z","author_association":"CONTRIBUTOR","body":"Ah, I see! I mistakenly updated `packages/gatsby-image/index.js` but not `packages/gatsby-image/src/index.js`.\r\n\r\nCan anyone advise which of the following is required?\r\n\r\n1. Update both files\r\n2. Update only `src/index.js`\r\n\r\nI'll fix the PR from there."}}
{"actor":{"display_login":"ooloth"}}