Skip to content

Commit e406def

Browse files
authored
chore(docs): remove recommendation about using priority over loading=eager with next/image (#71562)
This recommendation to use `priority` instead of `loading=eager` is a little confusing. We don't want `priority` to be overused because it can hurt performance so we can remove this recommendation from the documentation. TLDR: - use `priority` for LCP like a hero image above the fold - use `loading=eager` for other images above the folder - use `loading=lazy` (default) for everything below the fold - use `fetchPriority=high` if you want to load an image out of order that its found in the document
1 parent c0722a5 commit e406def

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

docs/02-app/02-api-reference/01-components/image.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ A callback function that is invoked if the image fails to load.
373373

374374
### `loading`
375375

376-
> **Recommendation**: This property is only meant for advanced use cases. Switching an image to load with `eager` will normally **hurt performance**. We recommend using the [`priority`](#priority) property instead, which will eagerly preload the image.
377-
378376
```js
379377
loading = 'lazy' // {lazy} | {eager}
380378
```

docs/03-pages/02-api-reference/01-components/image-legacy.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,6 @@ The `onLoadingComplete` function accepts one parameter, an object with the follo
221221

222222
### loading
223223

224-
> **Attention**: This property is only meant for advanced usage. Switching an
225-
> image to load with `eager` will normally **hurt performance**.
226-
>
227-
> We recommend using the [`priority`](#priority) property instead, which
228-
> properly loads the image eagerly for nearly all use cases.
229-
230224
The loading behavior of the image. Defaults to `lazy`.
231225

232226
When `lazy`, defer loading the image until it reaches a calculated distance from

0 commit comments

Comments
 (0)