{"id":22356852,"url":"https://github.com/ayamflow/images-ready","last_synced_at":"2026-02-23T13:31:42.274Z","repository":{"id":29121162,"uuid":"32650896","full_name":"ayamflow/images-ready","owner":"ayamflow","description":"Wait for a set of images to be loaded.","archived":false,"fork":false,"pushed_at":"2015-03-21T21:33:31.000Z","size":468,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T19:09:23.180Z","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/ayamflow.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}},"created_at":"2015-03-21T21:33:03.000Z","updated_at":"2022-11-24T20:13:03.000Z","dependencies_parsed_at":"2022-08-02T12:14:40.180Z","dependency_job_id":null,"html_url":"https://github.com/ayamflow/images-ready","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fimages-ready","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fimages-ready/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fimages-ready/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayamflow%2Fimages-ready/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayamflow","download_url":"https://codeload.github.com/ayamflow/images-ready/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618277,"owners_count":21134200,"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-12-04T14:12:12.645Z","updated_at":"2025-10-25T23:07:11.099Z","avatar_url":"https://github.com/ayamflow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"images-ready\n===\n\nWait for a set of images to be loaded.\n\n## Installation\n`npm i images-ready --save`\n\n## Usage\n`onImagesReady(images, callback)`\n* `images` can be an array or a NodeList of HTMLImageElements.\n* `callback` must be a function, called when all the images are loaded.\n\nThe callback is passed an `images` array that contains a list of object containing the image and its load event, in the same order the images were passed to the function.\n\n`images`\n* `img` the origin HTMLImageElement object\n* `event` the load event\n\n## Example\n```js\n\nvar onImagesReady = require('images-ready');\nvar $images = document.querySelectorAll('img');\nonImagesReady($images, function(images) {\n  for(var i = 0; i \u003c images.length; i++) {\n    context.drawImage(images[i].img, 0, 0);\n  }\n});\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fimages-ready","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayamflow%2Fimages-ready","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayamflow%2Fimages-ready/lists"}