{"action":"opened","issue":{"url":"https://api.github.com/repos/badges/shields/issues/577","labels_url":"https://api.github.com/repos/badges/shields/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/badges/shields/issues/577/comments","events_url":"https://api.github.com/repos/badges/shields/issues/577/events","html_url":"https://github.com/badges/shields/issues/577","id":119261676,"number":577,"title":"Replace base64 with plain body","user":{"login":"thekondrashov","id":8389542,"avatar_url":"https://avatars.githubusercontent.com/u/8389542?v=3","gravatar_id":"","url":"https://api.github.com/users/thekondrashov","html_url":"https://github.com/thekondrashov","followers_url":"https://api.github.com/users/thekondrashov/followers","following_url":"https://api.github.com/users/thekondrashov/following{/other_user}","gists_url":"https://api.github.com/users/thekondrashov/gists{/gist_id}","starred_url":"https://api.github.com/users/thekondrashov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thekondrashov/subscriptions","organizations_url":"https://api.github.com/users/thekondrashov/orgs","repos_url":"https://api.github.com/users/thekondrashov/repos","events_url":"https://api.github.com/users/thekondrashov/events{/privacy}","received_events_url":"https://api.github.com/users/thekondrashov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-28T01:13:05Z","updated_at":"2015-11-28T01:13:05Z","closed_at":null,"body":"At the moment, badges with icons such as these:\r\n![GitHub forks](https://img.shields.io/github/forks/badges/shields.svg?style=social&label=Fork) ![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)\r\n&hellip; contain svg-logos in the base64-coded form in the attribute of `<image />` tag:\r\n```svg\r\n<svg xmlns=\"...\">\r\n  <!-- some code -->\r\n  <image xlink:href=\"data:image/svg+xml;base64,HUGE+DATA\"/>\r\n  <!-- some code -->\r\n</svg>\r\n```\r\nBut it is possible to embed one svg-image into another svg-image as plain body.\r\nFor example:\r\n```svg\r\n<svg xmlns=\"...\">\r\n  <!-- some code -->\r\n  <svg><!-- plain body of injected svg --></svg>\r\n  <!-- some code -->\r\n</svg>\r\n```\r\nTest it with the example in the wild: https://commons.wikimedia.org/wiki/File:English_language.svg\r\nIn this case, child svg inherits properties of parent svg, but you can override them:\r\n```svg\r\n<!-- now -->\r\n<image x=\"5\" y=\"3\" width=\"14\" height=\"14\" xlink:href=\"data:image/svg+xml;base64,HUGE+DATA\"/>\r\n<!-- will be -->\r\n<svg x=\"5\" y=\"3\" width=\"14\" height=\"14\" viewBox=\"...\"><!-- plain body --></svg>\r\n```\r\nYou even can remove `xmlns=\"http://www.w3.org/2000/svg\"` attribute from child svg.\r\nUsing this tip you can replace the huge base64 code with simple, short and readable plain code.\r\nBut of course, it breaks the current algorithm for generating the badges. What do you think?"}}