{"action":"opened","issue":{"url":"https://api.github.com/repos/aryehraber/statamic-responsive-img/issues/2","repository_url":"https://api.github.com/repos/aryehraber/statamic-responsive-img","labels_url":"https://api.github.com/repos/aryehraber/statamic-responsive-img/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/aryehraber/statamic-responsive-img/issues/2/comments","events_url":"https://api.github.com/repos/aryehraber/statamic-responsive-img/issues/2/events","html_url":"https://github.com/aryehraber/statamic-responsive-img/issues/2","id":356513056,"node_id":"MDU6SXNzdWUzNTY1MTMwNTY=","number":2,"title":"FR: Iterate over an array of asset","user":{"login":"aerni90","id":23167701,"node_id":"MDQ6VXNlcjIzMTY3NzAx","avatar_url":"https://avatars1.githubusercontent.com/u/23167701?v=4","gravatar_id":"","url":"https://api.github.com/users/aerni90","html_url":"https://github.com/aerni90","followers_url":"https://api.github.com/users/aerni90/followers","following_url":"https://api.github.com/users/aerni90/following{/other_user}","gists_url":"https://api.github.com/users/aerni90/gists{/gist_id}","starred_url":"https://api.github.com/users/aerni90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerni90/subscriptions","organizations_url":"https://api.github.com/users/aerni90/orgs","repos_url":"https://api.github.com/users/aerni90/repos","events_url":"https://api.github.com/users/aerni90/events{/privacy}","received_events_url":"https://api.github.com/users/aerni90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-03T13:47:17Z","updated_at":"2018-09-03T13:47:17Z","closed_at":null,"author_association":"NONE","body":"In some cases it is crucial to be able to iterate over an array of assets. For instance if you want to retrieve a <title> or <alt> tag. As well I mostly need more control over the <img> tag. For instance to add custom data-attributes for lazy-loading. Is this possible?\r\n\r\nMy current implementation for responsive images looks something like this.\r\n\r\n```\r\n---\r\nslider:\r\n  - /assets/images/image-1.jpg\r\n  - /assets/images/image-2.jpg\r\n---\r\n\r\n{{ assets:slider }}\r\n        <img data-src=\"{{ glide:url preset=\"1000\" }}\" class=\"swiper-lazy\"\r\n                data-srcset=\"\r\n                        {{ glide:url preset=\"1400\" }} 1400w,\r\n                        {{ glide:url preset=\"1200\" }} 1200w,\r\n                        {{ glide:url preset=\"1000\" }} 1000w,\r\n                       {{ glide:url preset=\"800\" }} 800w,\r\n                        {{ glide:url preset=\"600\" }} 600w,\r\n                        {{ glide:url preset=\"400\" }} 400w\"\r\n                sizes=\"\r\n                        (min-width: 1921px) 30vw,\r\n                        (min-width: 1800px) 40vw,\r\n                        (min-width: 1200px) 50vw,\r\n                        (min-width: 940px) 60vw,\r\n                        (min-width: 640px) 85vw,\r\n                        100vw\"\r\n                title=\"{{ title }}\"\r\n                alt=\"{{ alt }}\">\r\n{{ /assets:slider }}\r\n``\r\n`\r\n\r\nAs well I wonder if you could add a settings file for image quality, min and max sizes and the like."}}
{"actor":{"display_login":"aerni90"}}