docs: make custom image loader a client component. (#51858)

This commit is contained in:
Lee Robinson 2023-06-28 19:36:20 -07:00 committed by GitHub
parent f17614abd1
commit e602207cb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -476,6 +476,8 @@ module.exports = {
This must point to a file relative to the root of your Next.js application. The file must export a default function that returns a string, for example:
```js
"use client"
export default function myImageLoader({ src, width, quality }) {
return `https://example.com/${src}?w=${width}&q=${quality || 75}`
}