{"action":"created","issue":{"url":"https://api.github.com/repos/haiwen/seahub/issues/602","labels_url":"https://api.github.com/repos/haiwen/seahub/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/haiwen/seahub/issues/602/comments","events_url":"https://api.github.com/repos/haiwen/seahub/issues/602/events","html_url":"https://github.com/haiwen/seahub/pull/602","id":77684185,"number":602,"title":"Enable thumbnail generation for image lightbox","user":{"login":"dhoffend","id":466581,"avatar_url":"https://avatars.githubusercontent.com/u/466581?v=3","gravatar_id":"","url":"https://api.github.com/users/dhoffend","html_url":"https://github.com/dhoffend","followers_url":"https://api.github.com/users/dhoffend/followers","following_url":"https://api.github.com/users/dhoffend/following{/other_user}","gists_url":"https://api.github.com/users/dhoffend/gists{/gist_id}","starred_url":"https://api.github.com/users/dhoffend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhoffend/subscriptions","organizations_url":"https://api.github.com/users/dhoffend/orgs","repos_url":"https://api.github.com/users/dhoffend/repos","events_url":"https://api.github.com/users/dhoffend/events{/privacy}","received_events_url":"https://api.github.com/users/dhoffend/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-18T14:48:32Z","updated_at":"2015-06-18T13:37:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haiwen/seahub/pulls/602","html_url":"https://github.com/haiwen/seahub/pull/602","diff_url":"https://github.com/haiwen/seahub/pull/602.diff","patch_url":"https://github.com/haiwen/seahub/pull/602.patch"},"body":"This is a pull request based on the ticket: #594\r\n\r\nThis update makes use of the thumbnail generation for larger image\r\ngalleries. While browsing images using the lightbox the user\r\ndoesn't have to download the full size image which could have several\r\nmb in size. instead a downscaled image is created (default 1280px).\r\n\r\nThe thumbnail_create function is modified to use jpeg instead of png\r\nfor thumbs > 100 pixel to save space (1mb > 200kb).\r\n\r\nThe generation hooks into the mangificPopop elementParse() callback\r\nbut as a blocking request until the thumb is generated.\r\n\r\nThe new settings variables have been introduced:\r\n* THUMBNAIL_LARGE = '100'\r\n* THUMBNAIL_EXTENSION_LARGE = 'jpeg'\r\n* ENABLE_THUMBNAIL_LARGE = True\r\n* THUMBNAIL_LARGE_SIZE = '1280'\r\n\r\nA new url has been added introduced (similar to create) to create\r\nthumbs based on the THUMBNAIL_LARGE_SIZE setting\r\n* /thumbnail/<repoid>/large/\r\n\r\nPossible updates/tweaks for the future:\r\n* switing to ajax method instead of image (right now the thumbnail\r\n  generation is a blocking ajax callback)\r\n* make cleanup urls /thumbnail/<repo>/create/(small|medium|large|xlarge)\r\n* take care of the devices screen resolution/retina/HiDPI settings, etc."},"comment":{"url":"https://api.github.com/repos/haiwen/seahub/issues/comments/113159223","html_url":"https://github.com/haiwen/seahub/pull/602#issuecomment-113159223","issue_url":"https://api.github.com/repos/haiwen/seahub/issues/602","id":113159223,"user":{"login":"dhoffend","id":466581,"avatar_url":"https://avatars.githubusercontent.com/u/466581?v=3","gravatar_id":"","url":"https://api.github.com/users/dhoffend","html_url":"https://github.com/dhoffend","followers_url":"https://api.github.com/users/dhoffend/followers","following_url":"https://api.github.com/users/dhoffend/following{/other_user}","gists_url":"https://api.github.com/users/dhoffend/gists{/gist_id}","starred_url":"https://api.github.com/users/dhoffend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhoffend/subscriptions","organizations_url":"https://api.github.com/users/dhoffend/orgs","repos_url":"https://api.github.com/users/dhoffend/repos","events_url":"https://api.github.com/users/dhoffend/events{/privacy}","received_events_url":"https://api.github.com/users/dhoffend/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T13:37:15Z","updated_at":"2015-06-18T13:37:15Z","body":"Hello Seafile Team. Did you had some time to review this pull request within the past month or is it already off the table to do rewrite the whole thumbnail generation stuff? I've seen changes to the view_shared_dir.html file so I guess we've to review/update my changes again."}}