Skip to content

Commit

Permalink
docs(v2): mention that plugin-ideal-image only perform compression …
Browse files Browse the repository at this point in the history
…on a production build (#2572)

* Add a note that `plugin-ideal-image` only perform compression on a production build. 

In reference to #2571

* Update using-plugins.md

* Update using-plugins.md

* Update using-plugins.md

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
  • Loading branch information
Noah-Silvera and yangshun authored Apr 10, 2020
1 parent dcf91eb commit a8ab0d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions website/docs/using-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,26 +403,25 @@ module.exports = {

### `@docusaurus/plugin-ideal-image`

Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder)
Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder) **in the production builds**.

```bash npm2yarn
npm install --save @docusaurus/plugin-ideal-image
```

Modify your `docusaurus.config.js`

```js title="docusaurus.config.js"
```diff
module.exports = {
// ...
// highlight-next-line
plugins: ['@docusaurus/plugin-ideal-image'],
// ...
};
...
+ plugins: ['@docusaurus/plugin-ideal-image'],
...
}
```

#### Usage

This plugin supports png, gif and jpg only
This plugin supports the PNG, GIF and JPG formats only.

```jsx
import Image from '@theme/IdealImage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ module.exports = {

### `@docusaurus/plugin-ideal-image`

Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder)
Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder) **in the production builds**.

```bash npm2yarn
npm install --save @docusaurus/plugin-ideal-image
Expand All @@ -412,7 +412,7 @@ module.exports = {

#### Usage

This plugin supports png, gif and jpg only
This plugin supports the PNG, GIF and JPG formats only.

```jsx
import Image from '@theme/IdealImage';
Expand Down

0 comments on commit a8ab0d6

Please sign in to comment.