{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/576","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/576/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/576/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/576/events","html_url":"https://github.com/ampproject/amphtml/issues/576","id":110817306,"number":576,"title":"AMP should support valid HTML","user":{"login":"shogun70","id":434778,"avatar_url":"https://avatars.githubusercontent.com/u/434778?v=3","gravatar_id":"","url":"https://api.github.com/users/shogun70","html_url":"https://github.com/shogun70","followers_url":"https://api.github.com/users/shogun70/followers","following_url":"https://api.github.com/users/shogun70/following{/other_user}","gists_url":"https://api.github.com/users/shogun70/gists{/gist_id}","starred_url":"https://api.github.com/users/shogun70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shogun70/subscriptions","organizations_url":"https://api.github.com/users/shogun70/orgs","repos_url":"https://api.github.com/users/shogun70/repos","events_url":"https://api.github.com/users/shogun70/events{/privacy}","received_events_url":"https://api.github.com/users/shogun70/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-10T21:14:49Z","updated_at":"2015-10-10T21:16:45Z","closed_at":null,"body":"The main purpose of many AMP custom elements is lazy loading media resources. For example:  \r\n\r\n    <amp-img src=\"image.jpg\" alt=\"Image description\"></amp-img>  \r\ninstead of  \r\n\r\n    <img src=\"image.jpg\" alt=\"Image description\" />\r\n\r\nBut `<amp-img>` is both invalid HTML and useless without JS. \r\nIt would be great if AMP could accept markup such as\r\n\r\n    <a rel=\"embed image\" href=\"image.jpg\">Image description</a>\r\nand transform it to `<amp-img>` during the AMP-script's initialization phase.\r\n\r\nThe AMP-specific attributes of `<amp-img>` could be read from `data-*` attributes, or inline JSON:\r\n\r\n    <a rel=\"embed image\" href=\"image.jpg\">\r\n        <script type=\"application/json\">\r\n        {\r\n        \"width\": 300\r\n        }\r\n        </script>\r\n        Image description\r\n    </a>\r\n\r\nSimilarly it would be great if all the AMP custom-elements had valid HTML equivalents. "},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/147126661","html_url":"https://github.com/ampproject/amphtml/issues/576#issuecomment-147126661","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/576","id":147126661,"user":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"created_at":"2015-10-10T21:16:45Z","updated_at":"2015-10-10T21:16:45Z","body":"Please escape HTML in your post.\nYou can do what you want today. Just nest the suggested markup in amp-img.\nOn Oct 10, 2015 2:14 PM, \"Sean Hogan\" <notifications@github.com> wrote:\n\n> The main purpose of many AMP custom elements is lazy loading media\n> resources. For example:\n>\n>\n>\n> instead of\n>\n> [image: Image description] <http://image.jpg>\n>\n> But <amp-img> is both invalid HTML and useless without JS.\n> It would be great if AMP could accept markup such as\n> Image description <http://image.jpg>\n> and transform it to <amp-img> during the AMP-script's initialization\n> phase.\n>\n> The AMP-specific attributes of <amp-img> could be read from data-*\n> attributes, or inline JSON:\n>\n>\n> Image description\n> <http://image.jpg>\n>\n> Similarly it would be great if all the AMP custom-elements had valid HTML\n> equivalents.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/ampproject/amphtml/issues/576>.\n>\n"}}