{"action":"created","issue":{"url":"https://api.github.com/repos/aFarkas/lazysizes/issues/179","labels_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/179/comments","events_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/179/events","html_url":"https://github.com/aFarkas/lazysizes/issues/179","id":112049538,"number":179,"title":"Get the current responsive img loaded","user":{"login":"WillyBrownHair","id":7604357,"avatar_url":"https://avatars.githubusercontent.com/u/7604357?v=3","gravatar_id":"","url":"https://api.github.com/users/WillyBrownHair","html_url":"https://github.com/WillyBrownHair","followers_url":"https://api.github.com/users/WillyBrownHair/followers","following_url":"https://api.github.com/users/WillyBrownHair/following{/other_user}","gists_url":"https://api.github.com/users/WillyBrownHair/gists{/gist_id}","starred_url":"https://api.github.com/users/WillyBrownHair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillyBrownHair/subscriptions","organizations_url":"https://api.github.com/users/WillyBrownHair/orgs","repos_url":"https://api.github.com/users/WillyBrownHair/repos","events_url":"https://api.github.com/users/WillyBrownHair/events{/privacy}","received_events_url":"https://api.github.com/users/WillyBrownHair/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-18T23:16:25Z","updated_at":"2015-10-20T10:45:16Z","closed_at":"2015-10-20T10:45:16Z","body":"I would like to know if it's possible to get the current url to the responsive version of image load.\r\n\r\nIf my image has these differentes versions \r\n```\r\ndata-srcset=\"\r\nhttp://url.com/img-240.jpg 240w, \r\nhttp://url.com/img-360.jpg 360w, \r\nhttp://url.com/img-480.jpg 480w, \r\nhttp://url.com/img-720.jpg 720w \"\r\n```\r\n\r\nCan I get witch of these one is loaded when my page is loaded ? \r\n\r\nI try this : \r\n```\r\nvar srcset = $('img').attr('srcset');\r\nconsole.log(srcset);\r\n```\r\nbut the console return `undefined `\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/aFarkas/lazysizes/issues/comments/149519114","html_url":"https://github.com/aFarkas/lazysizes/issues/179#issuecomment-149519114","issue_url":"https://api.github.com/repos/aFarkas/lazysizes/issues/179","id":149519114,"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-10-20T10:45:16Z","updated_at":"2015-10-20T10:45:16Z","body":"In Safari this is technically not possible. I haven't really understood what you want to achieve here.\r\n\r\nWhat do you need the currentSrc for? Can't you use simply just use the hole `srcset`? How is this related to lazysizes.\r\n\r\nAll browsers which do support `picture` also support `currentSrc`: This means you can also workaround this by using a `picture` pattern. This way Safari gets polyfilled and you have access to the normal `src`.\r\n\r\n```html\r\n<picture>\r\n    <source data-srcset=\"\r\nhttp://url.com/img-240.jpg 240w, \r\nhttp://url.com/img-360.jpg 360w, \r\nhttp://url.com/img-480.jpg 480w, \r\nhttp://url.com/img-720.jpg 720w \" />\r\n    <img class=\"lazyload\" data-sizes=\"auto\" />\r\n</picture>\r\n```\r\n\r\nPlease re-open if this is a lazysizes problem and I couldn't answer your question."}}