mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 20:17:06 +02:00
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:
parent
cf9fa2e78f
commit
8beeb81c8a
1 changed files with 9 additions and 0 deletions
|
@ -36,6 +36,15 @@ import thumbnail from './path/to/img.png';
|
||||||
<Image img={require('./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}
|
## Configuration {#configuration}
|
||||||
|
|
||||||
Accepted fields:
|
Accepted fields:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue