{"action":"created","issue":{"url":"https://api.github.com/repos/decidim/decidim/issues/3984","repository_url":"https://api.github.com/repos/decidim/decidim","labels_url":"https://api.github.com/repos/decidim/decidim/issues/3984/labels{/name}","comments_url":"https://api.github.com/repos/decidim/decidim/issues/3984/comments","events_url":"https://api.github.com/repos/decidim/decidim/issues/3984/events","html_url":"https://github.com/decidim/decidim/pull/3984","id":348887250,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTMzODUy","number":3984,"title":"Add compression settings to image uploader","user":{"login":"armandfardeau","id":20232956,"node_id":"MDQ6VXNlcjIwMjMyOTU2","avatar_url":"https://avatars2.githubusercontent.com/u/20232956?v=4","gravatar_id":"","url":"https://api.github.com/users/armandfardeau","html_url":"https://github.com/armandfardeau","followers_url":"https://api.github.com/users/armandfardeau/followers","following_url":"https://api.github.com/users/armandfardeau/following{/other_user}","gists_url":"https://api.github.com/users/armandfardeau/gists{/gist_id}","starred_url":"https://api.github.com/users/armandfardeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armandfardeau/subscriptions","organizations_url":"https://api.github.com/users/armandfardeau/orgs","repos_url":"https://api.github.com/users/armandfardeau/repos","events_url":"https://api.github.com/users/armandfardeau/events{/privacy}","received_events_url":"https://api.github.com/users/armandfardeau/received_events","type":"User","site_admin":false},"labels":[{"id":828660256,"node_id":"MDU6TGFiZWw4Mjg2NjAyNTY=","url":"https://api.github.com/repos/decidim/decidim/labels/status:%20WIP","name":"status: WIP","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T20:51:28Z","updated_at":"2018-08-09T10:30:25Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/decidim/decidim/pulls/3984","html_url":"https://github.com/decidim/decidim/pull/3984","diff_url":"https://github.com/decidim/decidim/pull/3984.diff","patch_url":"https://github.com/decidim/decidim/pull/3984.patch"},"body":"#### :tophat: What? Why?\r\nImage compression can save a significant amount of bandwidth. Adding a method to the `ImageUploader` class allows to compress all images at upload time.\r\n\r\nThe quality settings can be set in Decidim initializer with \r\n`Decidim.config.image_uploader_quality = 60`\r\n\r\nThe quality setting is set to 80 by default because change is imperceptible. My own test show that a quality between 60 and 80 is optimal.\r\n\r\nSee ref here : http://pieroxy.net/blog/2016/05/01/jpeg_compression_is_80_the_magic_quality_part_1_the_retina_screens.html\r\n\r\nLet's discuss this feature ! \r\n\r\nRegarding the tests : actually I dont know how to test this feature, I'm currently investigating, any help is welcome\r\n\r\n#### :clipboard: Subtasks\r\n- [ ] Add `CHANGELOG` entry\r\n- [ ] Add documentation regarding the feature \r\n- [ ] Add tests\r\n\r\n### :camera: Screenshots (optional)\r\nBefore : \r\n<img width=\"752\" alt=\"capture d ecran 2018-08-08 a 21 46 17\" src=\"https://user-images.githubusercontent.com/20232956/43863377-cb7fc67a-9b5c-11e8-847a-4ba20e7cf320.png\">\r\n\r\nAfter : \r\n<img width=\"746\" alt=\"capture d ecran 2018-08-08 a 22 39 58\" src=\"https://user-images.githubusercontent.com/20232956/43863394-d9f8514a-9b5c-11e8-8473-68ee44ec5b82.png\">\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/decidim/decidim/issues/comments/411713117","html_url":"https://github.com/decidim/decidim/pull/3984#issuecomment-411713117","issue_url":"https://api.github.com/repos/decidim/decidim/issues/3984","id":411713117,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTcxMzExNw==","user":{"login":"oriolgual","id":5254,"node_id":"MDQ6VXNlcjUyNTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5254?v=4","gravatar_id":"","url":"https://api.github.com/users/oriolgual","html_url":"https://github.com/oriolgual","followers_url":"https://api.github.com/users/oriolgual/followers","following_url":"https://api.github.com/users/oriolgual/following{/other_user}","gists_url":"https://api.github.com/users/oriolgual/gists{/gist_id}","starred_url":"https://api.github.com/users/oriolgual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oriolgual/subscriptions","organizations_url":"https://api.github.com/users/oriolgual/orgs","repos_url":"https://api.github.com/users/oriolgual/repos","events_url":"https://api.github.com/users/oriolgual/events{/privacy}","received_events_url":"https://api.github.com/users/oriolgual/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T10:30:25Z","updated_at":"2018-08-09T10:30:25Z","author_association":"COLLABORATOR","body":"Just `ImageUploader`"}}
{"actor":{"display_login":"oriolgual"}}