{"action":"created","issue":{"url":"https://api.github.com/repos/aFarkas/lazysizes/issues/56","labels_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/56/comments","events_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/56/events","html_url":"https://github.com/aFarkas/lazysizes/issues/56","id":56795838,"number":56,"title":"Won't pass W3C Markup Validation","user":{"login":"Twansparant","id":2317592,"avatar_url":"https://avatars.githubusercontent.com/u/2317592?v=3","gravatar_id":"","url":"https://api.github.com/users/Twansparant","html_url":"https://github.com/Twansparant","followers_url":"https://api.github.com/users/Twansparant/followers","following_url":"https://api.github.com/users/Twansparant/following{/other_user}","gists_url":"https://api.github.com/users/Twansparant/gists{/gist_id}","starred_url":"https://api.github.com/users/Twansparant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twansparant/subscriptions","organizations_url":"https://api.github.com/users/Twansparant/orgs","repos_url":"https://api.github.com/users/Twansparant/repos","events_url":"https://api.github.com/users/Twansparant/events{/privacy}","received_events_url":"https://api.github.com/users/Twansparant/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-06T10:34:04Z","updated_at":"2015-02-07T10:54:53Z","closed_at":"2015-02-06T16:20:07Z","body":"Hi there,\r\n\r\nI'm using your superb plugin in a flexslider to only load the first (responsive) image and lazyload the rest with the following (recommended) markup:\r\n\r\n```html\r\n<li class=\"slide\">\r\n<picture id=\"img-0\">\r\n\t<!--[if IE 9]><video style=\"display: none;\"><![endif]-->\r\n\t<source srcset=\"image-01-1600x700@2x.jpg 2x, image-01-1600x700.jpg 1x\" media=\"(min-width:1281px)\">\r\n\t<source srcset=\"image-01-1280x560@2x.jpg 2x, image-01-1280x560.jpg 1x\" media=\"(min-width:1025px)\">\r\n\t<source srcset=\"image-01-1024x575@2x.jpg 2x, image-01-1024x575.jpg 1x\" media=\"(min-width:769px)\">\r\n\t<source srcset=\"image-01-534x355@2x.jpg 2x, image-01-534x355.jpg 1x\">\r\n\t<!--[if IE 9]></video><![endif]-->\r\n\t<img src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" srcset=\"image-01-1280x560@2x.jpg 2x, image-01-1280x560.jpg 1x\" alt=\"My alt\" />\r\n</picture>\r\n</li>\r\n<li class=\"slide\">\r\n<picture id=\"img-1\">\r\n\t<!--[if IE 9]><video style=\"display: none;\"><![endif]-->\r\n\t<source data-srcset=\"image-02-1600x700@2x.jpg 2x, image-02-1600x700.jpg 1x\" media=\"(min-width:1281px)\">\r\n\t<source data-srcset=\"image-02-1280x560@2x.jpg 2x, image-02-1280x560.jpg 1x\" media=\"(min-width:1025px)\">\r\n\t<source data-srcset=\"image-02-1024x575@2x.jpg 2x, image-02-1024x575.jpg 1x\" media=\"(min-width:769px)\">\r\n\t<source data-srcset=\"image-02-534x355@2x.jpg 2x, image-02-534x355.jpg 1x\">\r\n\t<!--[if IE 9]></video><![endif]-->\t\t\t\t\t\t\t\t\r\n\t<!--[if gte IE 9]><!-->\r\n        <img class=\"lazyload\" data-srcset=\"image-02-1280x560@2x.jpg 2x, image-02-1280x560.jpg 1x\" alt=\"My alt\" />\r\n\t<!--<![endif]-->\r\n\t<!--[if lt IE 9]><img src=\"image-02-1280x560.jpg\" width=\"1280\" height=\"560\" alt=\"My alt\" /><![endif]-->\r\n</picture>\r\n</li>\r\n...etc\r\n```\r\n\r\nNow I would like to pass the W3C validation, but it gives me a lot of these errors:\r\n**A source element that has a following sibling source element or img element with a srcset attribute must have a media attribute and/or type attribute.**\r\nand\r\n**Element source is missing required attribute srcset.**\r\n\r\nI tried to add empty srcset in the source elements in slide 2 and up, but that doesn't help (even more errors). Can these errors somehow be prevented or should I just live with them?\r\n\r\nThanks a lot!"},"comment":{"url":"https://api.github.com/repos/aFarkas/lazysizes/issues/comments/73359491","html_url":"https://github.com/aFarkas/lazysizes/issues/56#issuecomment-73359491","issue_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/56","id":73359491,"user":{"login":"aFarkas","id":188254,"avatar_url":"https://avatars.githubusercontent.com/u/188254?v=3","gravatar_id":"","url":"https://api.github.com/users/aFarkas","html_url":"https://github.com/aFarkas","followers_url":"https://api.github.com/users/aFarkas/followers","following_url":"https://api.github.com/users/aFarkas/following{/other_user}","gists_url":"https://api.github.com/users/aFarkas/gists{/gist_id}","starred_url":"https://api.github.com/users/aFarkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aFarkas/subscriptions","organizations_url":"https://api.github.com/users/aFarkas/orgs","repos_url":"https://api.github.com/users/aFarkas/repos","events_url":"https://api.github.com/users/aFarkas/events{/privacy}","received_events_url":"https://api.github.com/users/aFarkas/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T10:54:52Z","updated_at":"2015-02-07T10:54:52Z","body":"@Twansparant \r\nThe difference between the markup in the demo and your markup above is, that the last ``source`` in the demo has a ``media``  attribute."}}