{"action":"created","issue":{"url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/117","repository_url":"https://api.github.com/repos/yo35/rpb-chessboard","labels_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/117/comments","events_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/117/events","html_url":"https://github.com/yo35/rpb-chessboard/issues/117","id":299782433,"number":117,"title":"generateSprite does not sideload images","user":{"login":"paulschreiber","id":86784,"avatar_url":"https://avatars2.githubusercontent.com/u/86784?v=4","gravatar_id":"","url":"https://api.github.com/users/paulschreiber","html_url":"https://github.com/paulschreiber","followers_url":"https://api.github.com/users/paulschreiber/followers","following_url":"https://api.github.com/users/paulschreiber/following{/other_user}","gists_url":"https://api.github.com/users/paulschreiber/gists{/gist_id}","starred_url":"https://api.github.com/users/paulschreiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulschreiber/subscriptions","organizations_url":"https://api.github.com/users/paulschreiber/orgs","repos_url":"https://api.github.com/users/paulschreiber/repos","events_url":"https://api.github.com/users/paulschreiber/events{/privacy}","received_events_url":"https://api.github.com/users/paulschreiber/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-02-23T17:06:35Z","updated_at":"2018-04-01T15:28:42Z","closed_at":"2018-04-01T15:28:42Z","author_association":"CONTRIBUTOR","body":"WordPress VIP support will not allow this plugin to be used until this issue is addressed:\r\n\r\n## models/ajax/formatpiecesetsprite.php\r\nOn the `generateSprite` method, the image is not being sideloaded, which means that will not work properly as it won't be copied to the CDN. Should be used `media_handle_sideload` or `wp_upload_bits` alongside with `apply_filters( wp_handle_upload, $file_upload )` to create a new attachment. You can take a look at the Watermark plugin for examples: https://vip-svn.wordpress.com/plugins/watermark-image-uploads/watermark-image-uploads.php\r\n"},"comment":{"url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/comments/377794434","html_url":"https://github.com/yo35/rpb-chessboard/issues/117#issuecomment-377794434","issue_url":"https://api.github.com/repos/yo35/rpb-chessboard/issues/117","id":377794434,"user":{"login":"yo35","id":5740068,"avatar_url":"https://avatars0.githubusercontent.com/u/5740068?v=4","gravatar_id":"","url":"https://api.github.com/users/yo35","html_url":"https://github.com/yo35","followers_url":"https://api.github.com/users/yo35/followers","following_url":"https://api.github.com/users/yo35/following{/other_user}","gists_url":"https://api.github.com/users/yo35/gists{/gist_id}","starred_url":"https://api.github.com/users/yo35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yo35/subscriptions","organizations_url":"https://api.github.com/users/yo35/orgs","repos_url":"https://api.github.com/users/yo35/repos","events_url":"https://api.github.com/users/yo35/events{/privacy}","received_events_url":"https://api.github.com/users/yo35/received_events","type":"User","site_admin":false},"created_at":"2018-04-01T15:28:42Z","updated_at":"2018-04-01T15:28:42Z","author_association":"OWNER","body":"Hi @paulschreiber and @adamsilverstein,\r\nFirst of all, thanks for your help and your valuable advices on this item.\r\n\r\nAt the end, I've come to a more radical solution than the one @adamsilverstein suggested in PR #126, which is to change the sprite format, in order to avoid the need for images such as ![old-sprite](https://user-images.githubusercontent.com/5740068/37254317-6dba73b4-253c-11e8-9f79-cf9fb43fae07.png). Now, each colored piece sprite is just a 64x64 pixel image, and it is resized on the fly by the browser when necessary.\r\n\r\nBeside solving this \"sideload\" problem, this solution has two benefits:\r\n- significant simplification of the custom pieceset form: there is no AJAX anymore, no need to maintain two versions of each custom sprite uploaded by the user, etc,\r\n- standard sprite images are now much smaller (e.g. 23 kB instead of 615 kB for the cburnett set).\r\n\r\nThe only drawback (as far as I see) is the resort to CSS attribute `background-size`, which is not supported by IE 8. I think not supporting IE 8 is admissible in 2018 though!\r\n\r\nThe fix is available in master."}}
{"actor":{"display_login":"yo35"}}