-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
scope: new proposalProposal to increase the product scope covered.Proposal to increase the product scope covered.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
Implement an enhanced version of the native <img> element.
Examples 🌈
import { Image } from '@material-ui/core';
<Image src="" />Motivation 🔦
A couple of features we could bring:
- Use
display: inline-block;to avoid layout jumps when the image is loading or broken. - Provide a custom fallback component when the image fails to load.
- Support a loading indicator when the image takes too much time to load, e.g Skeleton.
- Add a smooth animation for displaying the image once loaded.
- Support a placeholder to display while image's loading. An image of lower resolution.
- Lazy loading? Maybe not relevant considering https://caniuse.com/#feat=loading-lazy-attr and https://web.dev/native-lazy-loading/.
- Support aspect ratio. For instance, it allows rendering an image with a width constraint without having to wait for the image to load over the networks to resolve its height (which might lead to a layout shift).
Benchmark
- https://github.com/imgix/react-imgix
- https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/src/index.js
- https://amp.dev/documentation/examples/components/amp-img/?format=websites
- https://vuetifyjs.com/en/components/images/#images
- https://bootstrap-vue.js.org/docs/components/image
- https://github.com/chakra-ui/chakra-ui/blob/master/packages/chakra-ui/src/Image/index.js
- https://github.com/jossmac/react-images
- https://backpack.github.io/components/image?platform=web
- https://ionicframework.com/docs/api/img
- https://github.com/FormidableLabs/react-progressive-image
- https://joshwcomeau.com/performance/embracing-modern-image-formats/
- https://github.com/konvajs/use-image/
- https://github.com/mbrevda/react-image
- https://github.com/gokcan/react-shimmer
- https://react-spectrum.adobe.com/react-spectrum/Image.html
- https://github.com/fpapado/react-lazy-images
- https://github.com/react-component/image
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope: new proposalProposal to increase the product scope covered.Proposal to increase the product scope covered.type: new featureExpand the scope of the product to solve a new problem.Expand the scope of the product to solve a new problem.waiting for 👍Waiting for upvotes. Open for community feedback and needs more interest to be worked on.Waiting for upvotes. Open for community feedback and needs more interest to be worked on.