diff --git a/docs/api-reference/next/image.md b/docs/api-reference/next/image.md index 992ef06ea65e4..88f5b7fe75914 100644 --- a/docs/api-reference/next/image.md +++ b/docs/api-reference/next/image.md @@ -166,7 +166,10 @@ Should only be used when the image is visible above the fold. Defaults to ### placeholder A placeholder to use while the image is loading, possible values are `blur` or `empty`. Defaults to `empty`. -When `placeholder="blur"`, the `blurDataURL` will be used as the placeholder. If the `src` is an object from a static import, then `blurDataURL` will automatically be populated. If the `src` is a string, then you must provide the [`blurDataURL` property](#blurdataurl). + +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 `empty`, there will be no placeholder while the image is loading, only empty space. ## Advanced Props diff --git a/docs/basic-features/image-optimization.md b/docs/basic-features/image-optimization.md index 52a248861c40c..43a65d2790c7b 100644 --- a/docs/basic-features/image-optimization.md +++ b/docs/basic-features/image-optimization.md @@ -31,13 +31,14 @@ To add an image to your application, import the [`next/image`](/docs/api-referen ```jsx import Image from 'next/image' +import profilePic from '../public/me.png' function Home() { return ( <>
- Adding placeholder="blur"
to an image enables a blurry
- placeholder effect while that image loads.
+ The placeholder
property tells the image what to do while
+ loading.
- - See an example of the blurry placeholder. - + You can optionally enable a blur-up placeholder while the high + resolution image loads.
++ Try it out below (you may need to disable cache in dev tools to see the + effect if you already visited): +
+
- The following is an example of a reference to an interal image from the{' '}
+ The following is an example of a reference to an internal image from the{' '}
public
directory.
diff --git a/examples/image-component/pages/placeholder.js b/examples/image-component/pages/placeholder.js index 4a0fce5c45c24..2366080b1599c 100644 --- a/examples/image-component/pages/placeholder.js +++ b/examples/image-component/pages/placeholder.js @@ -4,12 +4,11 @@ import mountains from '../public/mountains.jpg' const Responsive = () => (