Unverified Commit 98acfaf8 authored by Joe Bell's avatar Joe Bell Committed by GitHub

Extend disclaimer for dynamic image imports (#26241)

* docs: extend disclaimer for dynamic image imports

* docs: extend guidance on blurDataURL

* Update docs/api-reference/next/image.md
Co-authored-by: 's avatarSteven <steven@ceriously.com>
Co-authored-by: 's avatarTim Neutkens <tim@timneutkens.nl>
parent 67f5830a
...@@ -167,7 +167,9 @@ Should only be used when the image is visible above the fold. Defaults to ...@@ -167,7 +167,9 @@ Should only be used when the image is visible above the fold. Defaults to
A placeholder to use while the image is loading, possible values are `blur` or `empty`. Defaults to `empty`. A placeholder to use while the image is loading, possible values are `blur` or `empty`. Defaults to `empty`.
When `blur`, the [`blurDataURL`](#blurdataurl) property will be used as the placeholder. If `src` is an object from a static import and the imported image is jpg, png, or webp, then `blurDataURL` will automatically be populated. Otherwise you must provide the [`blurDataURL`](#blurdataurl) property. When `blur`, the [`blurDataURL`](#blurdataurl) property will be used as the placeholder. If `src` is an object from a static import and the imported image is jpg, png, or webp, then `blurDataURL` will automatically be populated.
For dynamic images, you must provide the [`blurDataURL`](#blurdataurl) property. Solutions such as [Plaiceholder](https://github.com/joe-bell/plaiceholder) can help with `base64` generation.
When `empty`, there will be no placeholder while the image is loading, only empty space. When `empty`, there will be no placeholder while the image is loading, only empty space.
......
...@@ -79,7 +79,7 @@ function Home() { ...@@ -79,7 +79,7 @@ function Home() {
} }
``` ```
For dynamic images you have to provide `width`, `height` and `blurDataURL` manually. For dynamic or remote images, you'll have to provide [`width`](/docs/api-reference/next/image#width), [`height`](/docs/api-reference/next/image#height) and [`blurDataURL`](/docs/api-reference/next/image#blurdataurl) manually.
## Properties ## Properties
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment