Skip to content

Commit fbb6fbe

Browse files
committed
Readme fixes
1 parent 2f7ecc9 commit fbb6fbe

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

readme.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ export default () => (
2828
### Custom plugin options
2929

3030
```js
31+
import imagemin, {gifsicle, mozjpeg, optipng, svgo} from 'gulp-imagemin';
32+
3133
//
3234
.pipe(imagemin([
33-
imagemin.gifsicle({interlaced: true}),
34-
imagemin.mozjpeg({quality: 75, progressive: true}),
35-
imagemin.optipng({optimizationLevel: 5}),
36-
imagemin.svgo({
35+
gifsicle({interlaced: true}),
36+
mozjpeg({quality: 75, progressive: true}),
37+
optipng({optimizationLevel: 5}),
38+
svgo({
3739
plugins: [
3840
{removeViewBox: true},
3941
{cleanupIDs: false}
@@ -46,9 +48,11 @@ export default () => (
4648
### Custom plugin options and custom `gulp-imagemin` options
4749

4850
```js
51+
import imagemin, {svgo} from 'gulp-imagemin';
52+
4953
//
5054
.pipe(imagemin([
51-
imagemin.svgo({
55+
svgo({
5256
plugins: [
5357
{
5458
removeViewBox: true
@@ -79,7 +83,7 @@ Unsupported files are ignored.
7983
#### plugins
8084

8185
Type: `Array`\
82-
Default: `[imagemin.gifsicle(), imagemin.mozjpeg(), imagemin.optipng(), imagemin.svgo()]`
86+
Default: `[gifsicle(), mozjpeg(), optipng(), svgo()]`
8387

8488
[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use. This will completely overwrite all the default plugins. So, if you want to use custom plugins and you need some of defaults too, then you should pass default plugins as well. Note that the default plugins come with good defaults and should be sufficient in most cases. See the individual plugins for supported options.
8589

0 commit comments

Comments
 (0)