Skip to content

Commit

Permalink
Readme tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 25, 2017
1 parent e883c6a commit 95cf43e
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,39 @@ gulp.task('default', () =>
### Custom plugin options

```js
...
.pipe(imagemin([
imagemin.gifsicle({interlaced: true}),
imagemin.jpegtran({progressive: true}),
imagemin.optipng({optimizationLevel: 5}),
imagemin.svgo({plugins: [{removeViewBox: true}]})
]))
...
.pipe(imagemin([
imagemin.gifsicle({interlaced: true}),
imagemin.jpegtran({progressive: true}),
imagemin.optipng({optimizationLevel: 5}),
imagemin.svgo({plugins: [{removeViewBox: true}]})
]))
```

Note that you may come across an older, implicit syntax. In versions < 3, the same was written like this:

```js
...
.pipe(imagemin({
interlaced: true,
progressive: true,
optimizationLevel: 5,
svgoPlugins: [{removeViewBox: true}]
}))
...
.pipe(imagemin({
interlaced: true,
progressive: true,
optimizationLevel: 5,
svgoPlugins: [{removeViewBox: true}]
}))
```

### Custom plugin options and custom `gulp-imagemin` options

```js
...
.pipe(imagemin([
imagemin.svgo({plugins: [{removeViewBox: true}]})
], {
verbose: true
}))
...
.pipe(imagemin([
imagemin.svgo({plugins: [{removeViewBox: true}]})
], {
verbose: true
}))
```


Expand All @@ -81,7 +81,7 @@ Comes bundled with the following **lossless** optimizers:
- [optipng](https://github.com/imagemin/imagemin-optipng)*Compress PNG images*
- [svgo](https://github.com/imagemin/imagemin-svgo)*Compress SVG images*

These are bundled for convenience and most will not need anything else.
These are bundled for convenience and most users will not need anything else.

### imagemin([plugins], [options])

Expand All @@ -99,7 +99,7 @@ Default: `[imagemin.gifsicle(), imagemin.jpegtran(), imagemin.optipng(), imagemi
Type: `Object`

##### verbose

Type: `boolean`<br>
Default: `false`

Expand Down

0 comments on commit 95cf43e

Please sign in to comment.