{"action":"closed","issue":{"url":"https://api.github.com/repos/w3c/preload/issues/131","repository_url":"https://api.github.com/repos/w3c/preload","labels_url":"https://api.github.com/repos/w3c/preload/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/w3c/preload/issues/131/comments","events_url":"https://api.github.com/repos/w3c/preload/issues/131/events","html_url":"https://github.com/w3c/preload/issues/131","id":370218659,"node_id":"MDU6SXNzdWUzNzAyMTg2NTk=","number":131,"title":"Preloading images corresponding to picture element","user":{"login":"domfarolino","id":9669289,"node_id":"MDQ6VXNlcjk2NjkyODk=","avatar_url":"https://avatars1.githubusercontent.com/u/9669289?v=4","gravatar_id":"","url":"https://api.github.com/users/domfarolino","html_url":"https://github.com/domfarolino","followers_url":"https://api.github.com/users/domfarolino/followers","following_url":"https://api.github.com/users/domfarolino/following{/other_user}","gists_url":"https://api.github.com/users/domfarolino/gists{/gist_id}","starred_url":"https://api.github.com/users/domfarolino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domfarolino/subscriptions","organizations_url":"https://api.github.com/users/domfarolino/orgs","repos_url":"https://api.github.com/users/domfarolino/repos","events_url":"https://api.github.com/users/domfarolino/events{/privacy}","received_events_url":"https://api.github.com/users/domfarolino/received_events","type":"User","site_admin":false},"labels":[{"id":1029418166,"node_id":"MDU6TGFiZWwxMDI5NDE4MTY2","url":"https://api.github.com/repos/w3c/preload/labels/discuss","name":"discuss","color":"afea8c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/w3c/preload/milestones/2","html_url":"https://github.com/w3c/preload/milestone/2","labels_url":"https://api.github.com/repos/w3c/preload/milestones/2/labels","id":2655246,"node_id":"MDk6TWlsZXN0b25lMjY1NTI0Ng==","number":2,"title":"Level 2","description":"","creator":{"login":"igrigorik","id":10652,"node_id":"MDQ6VXNlcjEwNjUy","avatar_url":"https://avatars0.githubusercontent.com/u/10652?v=4","gravatar_id":"","url":"https://api.github.com/users/igrigorik","html_url":"https://github.com/igrigorik","followers_url":"https://api.github.com/users/igrigorik/followers","following_url":"https://api.github.com/users/igrigorik/following{/other_user}","gists_url":"https://api.github.com/users/igrigorik/gists{/gist_id}","starred_url":"https://api.github.com/users/igrigorik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrigorik/subscriptions","organizations_url":"https://api.github.com/users/igrigorik/orgs","repos_url":"https://api.github.com/users/igrigorik/repos","events_url":"https://api.github.com/users/igrigorik/events{/privacy}","received_events_url":"https://api.github.com/users/igrigorik/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2017-07-21T20:49:52Z","updated_at":"2018-10-29T07:41:13Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-10-15T15:29:12Z","updated_at":"2018-10-29T07:41:13Z","closed_at":"2018-10-29T07:41:13Z","author_association":"CONTRIBUTOR","body":"This issue is a follow-up to the [HTML PR](https://github.com/whatwg/html/pull/4048) I made to support imagesrcset and imagesizes attributes on the `<link>` element. Some complications arose with the `<picture>` element use-case. In summary, I believe the first image source in a `<picture>` element whose `media` [matches the environment](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#matches-the-environment) is chosen to be loaded, and the rest are not loaded (until necessary). This contrasts with naturally independent `<link rel=preload>`s, in which all requests are mandatory.\r\n\r\nIf the author of a site is trying to preload images that a `<picture>` element may choose between, there will be `n - 1` wasted preloads for a given viewport. It seems that there are two solutions to this:\r\n\r\n - The author makes the `<link rel=preload>`s have mutually exclusive media queries, so that only one will be preloaded, the one that would be chosen in the `<picture>`. As noted, this might not always be feasible or easy for authors, and puts the burden on them.\r\n - The platform provides some sort of way to _explicitly_ link `<link rel=preload>`s together, so the UA knows that they ~correspond to a `<picture>`, and the same selection algorithm can be applied to choose the image to load. One [proposal](https://github.com/whatwg/html/pull/4048#issuecomment-425154049) was to create a new `rel` value to indicate this.\r\n\r\nThoughts? The latter seems to make sense, but I just want to make sure it is worth the complexity.\r\n\r\n/cc @irori @zcorpan @developit"}}
{"actor":{"display_login":"yoavweiss"}}