docs(plugin-ideal-image): mention plugin changes type of imported images (#8948)

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
samatt14 2023-05-03 12:38:05 -05:00 committed by GitHub
parent cf9fa2e78f
commit 8beeb81c8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,15 @@ import thumbnail from './path/to/img.png';
<Image img={require('./path/to/img.png')} />
```
:::caution
This plugin registers a [Webpack loader](https://webpack.js.org/loaders/) that changes the type of imported/require images:
- Before: `string`
- After: `{preSrc: string, src: import("@theme/IdealImage").SrcImage}`
:::
## Configuration {#configuration}
Accepted fields: