{"action":"created","issue":{"url":"https://api.github.com/repos/electerious/Lychee/issues/556","repository_url":"https://api.github.com/repos/electerious/Lychee","labels_url":"https://api.github.com/repos/electerious/Lychee/issues/556/labels{/name}","comments_url":"https://api.github.com/repos/electerious/Lychee/issues/556/comments","events_url":"https://api.github.com/repos/electerious/Lychee/issues/556/events","html_url":"https://github.com/electerious/Lychee/issues/556","id":158330604,"number":556,"title":"Reducing medium-sized images","user":{"login":"nerbrume","id":2480350,"avatar_url":"https://avatars.githubusercontent.com/u/2480350?v=3","gravatar_id":"","url":"https://api.github.com/users/nerbrume","html_url":"https://github.com/nerbrume","followers_url":"https://api.github.com/users/nerbrume/followers","following_url":"https://api.github.com/users/nerbrume/following{/other_user}","gists_url":"https://api.github.com/users/nerbrume/gists{/gist_id}","starred_url":"https://api.github.com/users/nerbrume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerbrume/subscriptions","organizations_url":"https://api.github.com/users/nerbrume/orgs","repos_url":"https://api.github.com/users/nerbrume/repos","events_url":"https://api.github.com/users/nerbrume/events{/privacy}","received_events_url":"https://api.github.com/users/nerbrume/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-03T09:48:54Z","updated_at":"2016-06-12T10:52:27Z","closed_at":"2016-06-12T07:20:53Z","body":"Hello,\r\n\r\nI'm using lychee on my self-hosted machine, at home, with a \"typical\" DSL upload of 1Mb/s (at least in France).\r\nFrom an admittedly small subset of images, I get an average of more than 300kB for the medium images, meaning that my users need to wait something like 3s between images, which is a bit too much to my taste :)\r\n\r\nI was able to reduce this by simply modifying Photo.php, adding the two following lines in the Imagick section, resulting in images around 100kB : \r\n`$medium->stripImage();\r\n$medium->setImageCompressionQuality(70);`\r\nStripping the meta-data luckily doesn't break lychee \"About\" section, as the infos are fetched from the DB. The only thing we are losing is the ICC profile. The compression of 70 was quickly chosen, but on ~1920x1080 pictures, on a 24\" display, I don't see the obvious compression differences without pixel-peeping (I don't have good eyes)\r\n\r\nI have several questions / propositions :\r\n- Would you consider a global \"low-bandwidth\" setting ? If so, I can volunteer to implement it more properly than my hack (hoping GD offers meta-data manipulation), and I guess that the quality and inclusion of the ICC profile would then be subject to discussion.\r\n- Regardless of this, I think that _always_ stripping the meta-data is a good idea. It's often just a few kB saved, but it's better than nothing."},"comment":{"url":"https://api.github.com/repos/electerious/Lychee/issues/comments/225426138","html_url":"https://github.com/electerious/Lychee/issues/556#issuecomment-225426138","issue_url":"https://api.github.com/repos/electerious/Lychee/issues/556","id":225426138,"user":{"login":"electerious","id":499088,"avatar_url":"https://avatars.githubusercontent.com/u/499088?v=3","gravatar_id":"","url":"https://api.github.com/users/electerious","html_url":"https://github.com/electerious","followers_url":"https://api.github.com/users/electerious/followers","following_url":"https://api.github.com/users/electerious/following{/other_user}","gists_url":"https://api.github.com/users/electerious/gists{/gist_id}","starred_url":"https://api.github.com/users/electerious/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electerious/subscriptions","organizations_url":"https://api.github.com/users/electerious/orgs","repos_url":"https://api.github.com/users/electerious/repos","events_url":"https://api.github.com/users/electerious/events{/privacy}","received_events_url":"https://api.github.com/users/electerious/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T10:52:27Z","updated_at":"2016-06-12T10:52:27Z","body":"@nerbrume Yes, no medium-size generation with GD. It's too slow and PHP runs out of memory most of the time :-/"}}
{"actor":{"display_login":"electerious"}}