{"id":18888910,"url":"https://github.com/naver/egjs-imready","last_synced_at":"2025-04-09T13:06:14.723Z","repository":{"id":45289986,"uuid":"314530582","full_name":"naver/egjs-imready","owner":"naver","description":"I'm Ready to check if the images or videos are loaded!","archived":false,"fork":false,"pushed_at":"2023-04-07T01:20:39.000Z","size":5805,"stargazers_count":63,"open_issues_count":1,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-06T18:50:38.014Z","etag":null,"topics":["egjs","image","lazy-loading","react","ready","video"],"latest_commit_sha":null,"homepage":"https://naver.github.io/egjs-imready","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2020-11-20T11:11:45.000Z","updated_at":"2025-01-31T00:15:38.000Z","dependencies_parsed_at":"2024-06-18T15:15:55.043Z","dependency_job_id":"2d5aa370-fdd1-4e3e-8f14-fb1d454fb697","html_url":"https://github.com/naver/egjs-imready","commit_stats":{"total_commits":71,"total_committers":5,"mean_commits":14.2,"dds":"0.18309859154929575","last_synced_commit":"c0f1a0ef4d69b724a5fde060b6ddb1085b00fa37"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-imready","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-imready/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-imready/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-imready/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naver","download_url":"https://codeload.github.com/naver/egjs-imready/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045231,"owners_count":21038553,"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":["egjs","image","lazy-loading","react","ready","video"],"created_at":"2024-11-08T07:46:32.730Z","updated_at":"2025-04-09T13:06:14.687Z","avatar_url":"https://github.com/naver.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"middle\" \u003e\u003cimg src=\"https://github.com/naver/egjs-imready/raw/main/demo/images/logo.png\"/\u003e\u003c/p\u003e\n\u003ch2 align=\"middle\"\u003eI'm Ready\u003c/h2\u003e\n\u003cp align=\"middle\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/@egjs/imready\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@egjs/imready.svg?style=flat-square\u0026color=007acc\u0026label=version\" alt=\"npm version\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/language-typescript-blue.svg?style=flat-square\"/\u003e\n\u003ca href=\"https://travis-ci.org/naver/egjs-imready\" target=\"_blank\"\u003e\u003cimg alt=\"Travis (.org)\" src=\"https://img.shields.io/travis/naver/egjs-imready.svg?style=flat-square\u0026label=build\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/naver/egjs-imready?branch=main\u0026style=flat-square\" target=\"_blank\"\u003e\u003cimg alt=\"Coveralls github\" src=\"https://img.shields.io/coveralls/github/naver/egjs-imready.svg?style=flat-square\u0026label=%E2%9C%85%20coverage\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/blob/main/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?style=flat-square\u0026label=license\u0026message=MIT\u0026color=08CE5D\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/tree/main/packages/react-imready\" target=\"_blank\"\u003e\u003cimg alt=\"React\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=React\u0026style=flat-square\u0026color=61daeb\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/tree/main/packages/vue-imready\" target=\"_blank\"\u003e\u003cimg alt=\"Vue\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Vue\u0026style=flat-square\u0026color=42b883\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/tree/main/packages/vue2-imready\" target=\"_blank\"\u003e\u003cimg alt=\"Vue 2\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Vue2\u0026style=flat-square\u0026color=42b883\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/tree/main/packages/ngx-imready\" target=\"_blank\"\u003e\u003cimg alt=\"Angular\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Angular\u0026style=flat-square\u0026color=dd0031\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/naver/egjs-imready/tree/main/packages/svelte-imready\" target=\"_blank\"\u003e\u003cimg alt=\"Svelte\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Svelte\u0026style=flat-square\u0026color=FF3E00\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"middle\"\u003eI'm Ready to check if the images or videos are loaded!\u003c/p\u003e\n\u003cp align=\"middle\"\u003e\n    \u003ca href=\"https://naver.github.io/egjs-imready\" target=\"_blank\"\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/a\u003e /\n    \u003ca href=\"https://naver.github.io/egjs-imready/release/latest/doc/\" target=\"_blank\"\u003e\u003cstrong\u003eAPI\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## Features\n* Check that all images and videos in the container are loaded.\n* If you know the size of the image or video in advance, you can skip loading and adjust the width and height automatically until the actual loading is completed.\n* Support Native Lazy Loading.\n\n## Documents\n- [Get Started and Demos](https://naver.github.io/egjs-imready/)\n- [API documentation](https://naver.github.io/egjs-imready/release/latest/doc/)\n\n## Download and Installation\n\nDownload dist files from repo directly or install it via npm.\n\n```bash\n$ npm install @egjs/imready\n```\n\n```html\n\u003cscript src=\"//naver.github.io/egjs-imready/release/latest/dist/imready.min.js\"\u003e\u003c/script\u003e\n```\n\n## How to use\n```js\nimport ImReady from \"@egjs/imready\";\n\nconst im = new ImReady().on(\"preReady\", () =\u003e {\n   // I'm pre-ready\n}).on(\"ready\", () =\u003e {\n   // I'm ready\n});\n\n// check element\nim.check([element]);\n```\n\n* When the `loading=\"lazy\"` or `data-lazy=\"true\"`(external lazy loading) attribute is used, the `preReadyElement`(hasLoading=true) event occurs and the size is 0. When loading is complete, the `readyElement`(hasLoading=true) event occurs and you can get the size.\n```html\n\u003cimg src=\"...\" /\u003e\n\u003cimg src=\"...\" /\u003e\n\u003cimg src=\"...\" loading=\"lazy\" /\u003e\n\u003cimg data-lazy=\"true\" /\u003e\n```\n* If you use `data-width` and `data-height` attributes, the size of self, child image, and video elements is automatically adjusted until loading is complete.\n```html\n\u003cdiv data-width=\"100\" data-height=\"100\"\u003e\n   \u003cimg src=\"...\" /\u003e\n   \u003cimg src=\"...\" /\u003e\n   \u003cimg src=\"...\" /\u003e\n\u003c/div\u003e\n```\n\n* If you use `data-skip=\"true\"` attribute, you can omit it even if there are images in itself and child image, and video elements.\n```html\n\u003cdiv data-skip=\"true\"\u003e\n   \u003cimg src=\"...\" /\u003e\n   \u003cimg src=\"...\" /\u003e\n   \u003cimg src=\"...\" /\u003e\n\u003c/div\u003e\n```\n\n### Events\n* **preReadyElement**: An event occurs when the element is pre-ready (when the size is known)\n* **preReady**: An event occurs when all element are pre-ready (when the size is known)\n* **readyElement**: An event occurs when all element are ready\n* **ready**: An event occurs when all element are ready\n\n\n### Sequence of events\n* If there is no data size attribute or loading attribute\n\n(preReadyElement =\u003e readyElement) x N =\u003e **preReady** =\u003e **ready**\n* If there is a data size attribute or a loading attribute\n\npreReadyElement * N =\u003e (preReadyElement =\u003e readyElement) x M =\u003e **preReady** =\u003e\nreadyElement(isPreReadyOver: true) x N =\u003e **ready**\n\n\n\n## Supported Browsers\nThe following are the supported browsers.\n\n|Internet Explorer|Chrome|Firefox|Safari|iOS|Android|\n|---|---|---|---|---|---|\n|9+(polyfill 8+)|Latest|Latest|Latest|7+|4+(polyfill 2.2+)|\n\n### **Use polyfill if you want to use it in a lower version browser.**\n* Array.prototype.forEach\n* Array.prototype.map\n* Array.prototype.some\n* Array.prototype.filter\n\n\n## How to start developing egjs-imready?\n\nFor anyone interested to develop egjs-imready, follow the instructions below.\n\n### Development Environment\n\n#### 1. Clone the repository\n\nClone the egjs-imready repository and install the dependency modules.\n\n```bash\n# Clone the repository.\n$ git clone https://github.com/naver/egjs-imready.git\n```\n\n#### 2. Install dependencies\n\n```\n# Install the dependency modules.\n$ npm install\n```\n\n#### 3. Build\n\nUse npm script to build eg.ImReady\n\n```bash\n# Run webpack-dev-server for development\n$ npm start\n\n# Build\n$ npm run build\n\n# Generate jsdoc\n$ npm run jsdoc\n```\n\nTwo folders will be created after complete build is completed.\n\n- **dist** folder: Includes the **imready.js** and **imready.min.js** files.\n- **doc** folder: Includes API documentation. The home page for the documentation is **doc/index.html**.\n\n### Linting\n\nTo keep the same code style, we adopted [ESLint](http://eslint.org/) to maintain our code quality. The [rules](https://github.com/naver/eslint-config-naver/tree/main/rules) are modified version based on [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).\nSetup your editor for check or run below command for linting.\n\n```bash\n$ npm run lint\n```\n\n### Test\n\nOnce you created a branch and done with development, you must perform a test running with `npm test` command before your push the code to a remote repository.\n\n```bash\n$ npm run test\n```\nRunning `npm test` command will start [Mocha](https://mochajs.org/) tests via [Karma-runner](https://karma-runner.github.io/).\n\n\n## Bug Report\n\nIf you find a bug, please report to us opening a new [Issues](https://github.com/naver/egjs-imready/issues) on GitHub.\n\n\n## License\negjs-imready is released under the [MIT license](http://naver.github.io/egjs/license.txt).\n\n```\nCopyright (c) 2020-present NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n\n\u003c!-- badges --\u003e\n[badge-version]: https://img.shields.io/npm/v/@egjs/imready.svg?style=flat\n[badge-build-status]: https://travis-ci.org/naver/egjs-imready.svg?branch=main\n[badge-coverage]: https://coveralls.io/repos/github/naver/egjs-imready/badge.svg?branch=main\n[badge-gk]: https://badges.greenkeeper.io/naver/egjs-imready.svg\n\n\u003c!-- links --\u003e\n[link-version]: https://www.npmjs.com/package/@egjs/imready\n[link-build-status]: https://travis-ci.org/naver/egjs-imready\n[link-coverage]: https://coveralls.io/github/naver/egjs-imready?branch=main\n[link-gk]: https://greenkeeper.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fegjs-imready","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaver%2Fegjs-imready","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fegjs-imready/lists"}