-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force creating a WebP file #3
Comments
Hey and thanks for contributing to this project :) Can you give me an image which is the same size when converted to WebP, so that I can test the behavior and fix the bug? |
Hey @iampava, thanks for your quick reply. I can unfortunately not share the images that are causing me problems. I could possibly do some digging to find an image which causes the same problem. However I did some more investigating and found out that this is a feature/bug in imagemin. There are open issues in the imagemin-webp repo and the imagemin repo itself. |
Oh snap... I was hoping it's a mistake on my side and not in the dependencies. I see that |
Nice job finding a PR relating to this. Their code review process is quite extensive, I am not going to hold my breath waiting to get his merged. :P |
Hmm... now that I think about it I guess I could add a log message telling you if any of your images didn't get converted. This way, when you make the build you'll know if something went wrong |
Added this enhancement covering the change. I'm gonna take care of it on Friday ;) |
Released version 2.0.0 with the added feature |
Hey @iampava, The PR fixing the root of this issue has been merged. I believe this should no longer be a problem in the newest version of "imagemin". PR: imagemin/imagemin@744a6c2 |
Nice! Bumped up the dependency version. Will be in the next release, as soon as I fix #6 |
Published v3.0.0 on NPM! |
Do you want to request a feature or report a bug?
Possible bug/Feature idea
What is the current behaviour?
If the resulting WebP file is the same size as the original file the plugin does not create a WebP file.
What is the expected behaviour?
Should create a WebP file for each image matching the RegExp. This should possibly be optional by configuring the plugin with a force = true boolean. Otherwise it should be the default behaviour.
Example:
config: [{
test: /.(jpe?g)$/,
options: {
quality: 80,
force: true
}
}, {
test: /.(png)$/,
options: {
lossless: true,
force: true
}
}],
The text was updated successfully, but these errors were encountered: