caiguanhao / grunt-webp-compress

Convert images to WebP format with the encoder tool cwebp.
https://www.npmjs.org/package/grunt-webp-compress
MIT License
2 stars 1 forks source link

webp extension appended to current extension #4

Open Desmodue opened 7 years ago

Desmodue commented 7 years ago

When I run this the webp extension is added to the original extension.

i.e image1.jpg becomes image1.jpg.webp

is there an option to remove the previous extension ?

caiguanhao commented 7 years ago

Could you show me your Gruntfile.js? Or you can just add a task to rename those files by yourself.

Desmodue commented 7 years ago

Here's the cwebp section cwebp: { images: { options: { arguments: ['-q', 90], concurrency: 20 }, files: [{ src: ['<%= yeoman.app %>/images/{,/}.jpg', '<%= yeoman.app %>/images/{,/}.png'] }] } }, I use yeoman to scaffold out my app. Strangely I am sure it has worked previously. Also tried adding 'expand: true' to the files section but that just overwrote all my .jpg and .png files. It didn't append the webp extension though. Renaming is an option, have just tried grunt-cwebp which looks very similar and does work. Guessing it is an external package that has changed that is causing the issue ?

Gary