react-cool-img is a lightweight React
<Img /> component, which helps you handle image UX (user experience) and performance optimization as a professional guy 🤓
⚡️ Live demo: https://react-cool-img.org
- 🖼 Placeholders for satisfying various image loading states (e.g. loading image > actual image > error image).
- 🛋 Smart lazy loading with performant and efficient way, using Intersection Observer.
- 🤖 Built-in auto-retry mechanism. User won't miss out your important information.
- 🚫 Aborts any current image downloads on component unmount potentially saving bandwidth and browser resources.
- 📜 Supports TypeScript type definition.
- 🦔 Tiny size (~ 2kB gzipped). No external dependencies, aside for the
- 🍰 Easy to use.
For more usage details checkout the project's GitHub page: https://github.com/wellyshen/react-cool-img.https://github.com/wellyshen/react-cool-starter
You can also install this package is distributed via npm.
$ yarn add react-cool-img # or $ npm install --save react-cool-img