Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental
next/future/image
component (#37927)
This PR introduces a new experimental component, `next/future/image`, which is inspired by the existing experimental `layout="raw"`. The difference is that much of the code has been deleted in order to reduce client-side code as well as reduce complexity: - No `layout` prop - No `loader` config (although `loader` prop works) - No `IntersectionObserver`, use native `loading="lazy"` - No `lazyBoundary` - No `lazyRoot` - No `fill` (yet) so width & height are required - No `objectFit` (use `style` instead) - No `objectPosition` (use `style` instead) This improves performance because native `loading="lazy"` doesn't need to wait for React Hydration and client-side JS. In a future PR, we will modify `next/image` to remove `layout="raw"` since this new component supersedes it. ## Feature - [x] Integration tests added - [x] Documentation added - [x] Telemetry added. In case of a feature if it's used or not. - [x] Errors have helpful link attached, see `contributing.md`
- Loading branch information