Skip to content

Commit

Permalink
V3.0.0 README changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iampava committed Jan 1, 2019
1 parent 7409e6f commit 38c06ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@


# imagemin-webp-webpack-plugin




Webpack plugin which converts images to the [WebP](https://developers.google.com/speed/webp/) format while also keeping the original files.


It uses [imagemin](https://www.npmjs.com/package/imagemin) and [imagemin-webp](https://www.npmjs.com/package/imagemin-webp) under the hood.





## Motivation



Although WebP images are not currently supported in all browsers, they are at least 25% smaller than PNG's or JPEG's. So, certain users can get a much better experience.

Check the support tables on [Can I use](https://caniuse.com/#feat=webp)




## Installation



```bash

$ npm install imagemin-webp-webpack-plugin --save-dev

```


Expand All @@ -49,7 +39,7 @@ module.exports = {
plugins: [new ImageminWebpWebpackPlugin()]
};
```

⚠ Keep in mind that plugin order matters, so usually you'd want to put it last.



Expand All @@ -72,7 +62,7 @@ Default:
```
{
config: [{
test: /\.(jpe?g|png)$/,
test: /\.(jpe?g|png)/,
options: {
quality: 75
}
Expand Down
2 changes: 1 addition & 1 deletion plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ImageminWebpWebpackPlugin {

return savedKB;
}).catch(err => {
let customErr = new Error(`ImageminWebpWebpackPlugin: "${name}" wasn't converted, most likely because the conversion would result in a bigger file!`);
let customErr = new Error(`ImageminWebpWebpackPlugin: "${name}" wasn't converted!`);

nrOfImagesFailed++;

Expand Down

0 comments on commit 38c06ba

Please sign in to comment.