{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5682","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5682/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5682/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5682/events","html_url":"https://github.com/gatsbyjs/gatsby/pull/5682","id":328762244,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjA4Nzg5","number":5682,"title":"[WIP][gatsby-plugin-sharp] use MozJPEG for jpg compression","user":{"login":"Fetten","id":2660337,"node_id":"MDQ6VXNlcjI2NjAzMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2660337?v=4","gravatar_id":"","url":"https://api.github.com/users/Fetten","html_url":"https://github.com/Fetten","followers_url":"https://api.github.com/users/Fetten/followers","following_url":"https://api.github.com/users/Fetten/following{/other_user}","gists_url":"https://api.github.com/users/Fetten/gists{/gist_id}","starred_url":"https://api.github.com/users/Fetten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fetten/subscriptions","organizations_url":"https://api.github.com/users/Fetten/orgs","repos_url":"https://api.github.com/users/Fetten/repos","events_url":"https://api.github.com/users/Fetten/events{/privacy}","received_events_url":"https://api.github.com/users/Fetten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-02T17:34:45Z","updated_at":"2018-06-02T22:51:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/5682","html_url":"https://github.com/gatsbyjs/gatsby/pull/5682","diff_url":"https://github.com/gatsbyjs/gatsby/pull/5682.diff","patch_url":"https://github.com/gatsbyjs/gatsby/pull/5682.patch"},"body":"This is a working PR using [MozJPEG](https://github.com/mozilla/mozjpeg) for jpg compression in `gatsby-plugin-sharp`.\r\n\r\nAs images are often the heaviest resources on websites, it would be great if we could squeeze the file size of jpgs even more (despite the fact that current compression is really good). MozJPEG provides even better compression for jpg files than the current implementation. However, it takes more time to compress the images.\r\n\r\n**Test results with `using-gatsby-image` example**\r\n* Average image file-size compared to current compression: **-8.1%**\r\n* Best result compared to current compression: **-12.1%**\r\n* Gatsby thumbnail creation time increase: **2.3x**\r\n\r\n**Concerns**\r\nDue to the increased thumbnail creation time I am not sure if we should use MozJPEG as a default.\r\n* Will the longer build-time frustrate Gatsby users? Or will the better compression results balance this out?\r\n* Would it be an option to make using MozJPEG an opt-in via the config?\r\n\r\nWould like to hear your thoughts on this!\r\n"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/394122466","html_url":"https://github.com/gatsbyjs/gatsby/pull/5682#issuecomment-394122466","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/5682","id":394122466,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDEyMjQ2Ng==","user":{"login":"KyleAMathews","id":71047,"node_id":"MDQ6VXNlcjcxMDQ3","avatar_url":"https://avatars3.githubusercontent.com/u/71047?v=4","gravatar_id":"","url":"https://api.github.com/users/KyleAMathews","html_url":"https://github.com/KyleAMathews","followers_url":"https://api.github.com/users/KyleAMathews/followers","following_url":"https://api.github.com/users/KyleAMathews/following{/other_user}","gists_url":"https://api.github.com/users/KyleAMathews/gists{/gist_id}","starred_url":"https://api.github.com/users/KyleAMathews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KyleAMathews/subscriptions","organizations_url":"https://api.github.com/users/KyleAMathews/orgs","repos_url":"https://api.github.com/users/KyleAMathews/repos","events_url":"https://api.github.com/users/KyleAMathews/events{/privacy}","received_events_url":"https://api.github.com/users/KyleAMathews/received_events","type":"User","site_admin":false},"created_at":"2018-06-02T22:51:00Z","updated_at":"2018-06-02T22:51:00Z","author_association":"CONTRIBUTOR","body":"Ooooo! This is fantastic. I didn't realize MozJPEG was so good!\r\n\r\nI am worried about doubling processing time. Creating thumbnails can already be a large chunk of site builds and this would exacerbate that.\r\n\r\nI would like to make this available to people. Perhaps there could be a global flag for gatsby-plugin-sharp to opt-in to this like you suggest. Then you could enable this for production deploys if it doesn't kill your build times but disable during development."}}
{"actor":{"display_login":"KyleAMathews"}}