{"id":20447641,"url":"https://github.com/acrool/acrool-react-img","last_synced_at":"2025-08-15T22:43:31.871Z","repository":{"id":258226785,"uuid":"874197601","full_name":"acrool/acrool-react-img","owner":"acrool","description":"Img library based for Reactjs","archived":false,"fork":false,"pushed_at":"2025-07-22T02:14:16.000Z","size":1556,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T13:07:49.113Z","etag":null,"topics":["image-lazy-load","img","reactjs"],"latest_commit_sha":null,"homepage":"https://acrool-react-img.pages.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acrool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-17T12:18:46.000Z","updated_at":"2025-07-22T02:14:20.000Z","dependencies_parsed_at":"2024-11-11T11:28:49.255Z","dependency_job_id":"d30f75bc-046a-4ad0-83c5-7940449aeae8","html_url":"https://github.com/acrool/acrool-react-img","commit_stats":null,"previous_names":["acrool/acrool-react-img"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/acrool/acrool-react-img","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrool%2Facrool-react-img","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrool%2Facrool-react-img/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrool%2Facrool-react-img/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrool%2Facrool-react-img/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acrool","download_url":"https://codeload.github.com/acrool/acrool-react-img/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrool%2Facrool-react-img/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270640713,"owners_count":24620999,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["image-lazy-load","img","reactjs"],"created_at":"2024-11-15T10:28:05.284Z","updated_at":"2025-08-15T22:43:31.854Z","avatar_url":"https://github.com/acrool.png","language":"TypeScript","funding_links":[],"categories":["React component"],"sub_categories":[],"readme":"# Acrool React Img\n\n\u003ca href=\"https://acrool-react-img.pages.dev/\" title=\"Acrool React Img - Fast custom img for Reactjs\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/acrool/acrool-react-img/main/example/public/og.webp\" alt=\"Acrool React Img Logo\"/\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n    Fast custom img for Reactjs\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![NPM](https://img.shields.io/npm/v/@acrool/react-img.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-img)\n[![npm](https://img.shields.io/bundlejs/size/@acrool/react-img?style=for-the-badge)](https://github.com/acrool/@acrool/react-img/blob/main/LICENSE)\n[![npm](https://img.shields.io/npm/l/@acrool/react-img?style=for-the-badge)](https://github.com/acrool/react-img/blob/main/LICENSE)\n\n[![npm downloads](https://img.shields.io/npm/dm/@acrool/react-img.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-img)\n[![npm](https://img.shields.io/npm/dt/@acrool/react-img.svg?style=for-the-badge)](https://www.npmjs.com/package/@acrool/react-img)\n\n\u003c/div\u003e\n\n\n`^1.1.0 support react \u003e=18.0.0 \u003c20.0.0`\n\n## Features\n\n- Support width, height, aspect\n- Support lazy load image\n- Support mask animate\n- Use native img tag with object-fit for better performance\n\n## Why use img tag instead of background image?\n\nUsing the native img tag with object-fit provides better performance and accessibility. It also avoids potential issues with background image layering and provides native image attributes like alt text for better SEO and accessibility.\n\n\n## Install\n\n```bash\nyarn add @acrool/react-img\n```\n\n## Usage\n\nadd in your index.tsx\n```tst\nimport \"@acrool/react-img/dist/index.css\";\n```\n\nthen in your page\n```tsx\nimport {Flex, fr, Grid} from '@acrool/react-grid';\nimport styled from 'styled-components';\n\nimport {Img} from '@acrool/react-img';\nimport {generatorArray} from '@acrool/js-utils/array';\n\nconst Example = () =\u003e {\n    return \u003cImg\n        src=\"https://acrool-react-picker.pages.dev/sample/1.jpg\"\n        width={200}\n        height={200}\n        radius={8}\n        isLazy\n        isLazyLoaderVisible\n    /\u003e;\n};\n\nexport default Example;\n\n```\n\n\n\nThere is also a example that you can play with it:\n\n[![Play react-editext-example](https://raw.githubusercontent.com/acrool/acrool-react-img/main/play-in-example-button.svg)](https://acrool-react-img.pages.dev)\n\n\n## License\n\nMIT © [Acrool](https://github.com/acrool) \u0026 [Imagine](https://github.com/imagine10255)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrool%2Facrool-react-img","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facrool%2Facrool-react-img","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrool%2Facrool-react-img/lists"}