{"id":13498436,"url":"https://github.com/ava-cassiopeia/lazy-img","last_synced_at":"2026-05-22T06:34:58.165Z","repository":{"id":93655443,"uuid":"101239286","full_name":"ava-cassiopeia/lazy-img","owner":"ava-cassiopeia","description":"Custom HTML element for lazy-loading images when they are needed","archived":false,"fork":false,"pushed_at":"2017-11-17T04:55:10.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-21T03:12:50.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ava-cassiopeia.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-24T01:12:36.000Z","updated_at":"2022-09-21T17:28:57.000Z","dependencies_parsed_at":"2024-01-18T23:04:47.735Z","dependency_job_id":"5255a9a1-f0a9-4e6b-84e9-380b81fe655f","html_url":"https://github.com/ava-cassiopeia/lazy-img","commit_stats":null,"previous_names":["aeolingamenfel/lazy-img"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-cassiopeia%2Flazy-img","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-cassiopeia%2Flazy-img/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-cassiopeia%2Flazy-img/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ava-cassiopeia%2Flazy-img/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ava-cassiopeia","download_url":"https://codeload.github.com/ava-cassiopeia/lazy-img/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246125368,"owners_count":20727416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T21:00:28.721Z","updated_at":"2025-12-27T01:27:14.358Z","avatar_url":"https://github.com/ava-cassiopeia.png","language":"JavaScript","funding_links":[],"categories":["Basic Elements"],"sub_categories":[],"readme":"# Lazy Image Custom Element\n\n[![npm version](https://badge.fury.io/js/lazy-img-element.svg)](https://badge.fury.io/js/lazy-img-element)\n\nCustom, production-ready HTML element (`\u003clazy-img\u003e`) that lazily loads images\nas they come on to the screen.\n\n## Getting the Element\n\nPlease see the\n[releases](https://github.com/aeolingamenfel/lazy-img/releases) page to get the \nlatest, minified version of the source for the `\u003clazy-img\u003e`. Import into your \nproject as needed.\n\nThe element is built on top of the custom element API, and uses the newer\n`IntersectionObserver` API. \n\nIf you just need to polyfill the `IntersectionObserver`, you can add the\nfollowing:\n\n```HTML\n\u003cscript src=\"https://polyfill.io/v2/polyfill.min.js?features=IntersectionObserver\"\u003e\u003c/script\u003e\n```\n\nIf you need to polyfill web components, please see\n[webcomponents.org/polyfills/](https://www.webcomponents.org/polyfills/)\n\n## Using the Element\n\nThe element is a 1-to-1 copy of the standard HTML `\u003cimg /\u003e` element, so all \nin-spec attributes and features should also be available to `\u003clazy-img\u003e` \nelements as well.\n\n*Example:*\n\n```HTML\n\u003clazy-img src=\"...\"\u003e\u003c/lazy-img\u003e\n```\n\n## Aspect Ratio Space\n\nIn addition to all normal features of the `\u003cimg /\u003e` tag, you can specify a \n`ratio` attribute so that the `\u003clazy-img\u003e` will occupy the proper space on the \npage while the image is loading. To do so, specify an aspect ratio like:\n`[width]:[height]`.\n\n*Example:*\n\n```HTML\n\u003clazy-img src=\"...\" ratio=\"16:9\"\u003e\u003c/lazy-img\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fava-cassiopeia%2Flazy-img","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fava-cassiopeia%2Flazy-img","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fava-cassiopeia%2Flazy-img/lists"}