{"id":18311082,"url":"https://github.com/dmitriyakkerman/lazy-img","last_synced_at":"2025-04-09T12:11:22.143Z","repository":{"id":144074469,"uuid":"423970926","full_name":"dmitriyakkerman/lazy-img","owner":"dmitriyakkerman","description":"Simple images lazy load module ","archived":false,"fork":false,"pushed_at":"2021-11-26T13:12:33.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T06:16:52.728Z","etag":null,"topics":["lazy-load","lazy-load-img","lazy-loading"],"latest_commit_sha":null,"homepage":"","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/dmitriyakkerman.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-02T19:19:50.000Z","updated_at":"2021-11-26T13:12:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"03ab3078-676e-40cb-99c1-0c1032929693","html_url":"https://github.com/dmitriyakkerman/lazy-img","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Flazy-img","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Flazy-img/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Flazy-img/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitriyakkerman%2Flazy-img/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitriyakkerman","download_url":"https://codeload.github.com/dmitriyakkerman/lazy-img/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036066,"owners_count":21037092,"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":["lazy-load","lazy-load-img","lazy-loading"],"created_at":"2024-11-05T16:16:22.759Z","updated_at":"2025-04-09T12:11:22.097Z","avatar_url":"https://github.com/dmitriyakkerman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lazy-img\n\nSimple images lazy load module \n\n**Usage**\n\n1. Create image element with _**data-srс**_ attribute:\n\n```html \n\u003cimg src=\"\" data-src=\"image.jpg\" alt=\"\"\u003e\n```\n\n2. Connect lazy-img.min.js.\n\n```js \n\u003cscript src=\"./dist/lazy-img.min.js\"\u003e\u003c/script\u003e\n```\n\n3 .Init plugin.\n\n```js\nLazyImg.init() // all 'img' tags with default \"rootMargin\" and \"threshold\"\nLazyImg.init(\".lazy\") // specific img selector with default \"rootMargin\" and \"threshold\"\nLazyImg.init(\".lazy\", \"50px\", 0.5) // specific img selector with specific \"rootMargin\" and \"threshold\" \n```\n     \n**Params**\n\n##### `param1`\nTarget element.\n\n*Type:* String  \n*Required:* false  \n*Default:* 'img'\n\n##### `param2`\nRootMargin. Native Intersection Observer parameter for margin around the image element.\n\n*Type:* String  \n*Required:* false  \n*Default:* '0px'\n\n##### `param3`\nThreshold. Native Intersection Observer parameter which indicates at what percentage of the image element visibility the lazy loading should be executed.\n\n*Type:* Number  \n*Required:* false  \n*Default:* 0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Flazy-img","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitriyakkerman%2Flazy-img","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitriyakkerman%2Flazy-img/lists"}