feat: option to convert png to webp #24
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature
cwebp-bin
JS wrapper to run Google'scwebp
PNG->WebP convert toolNotes
The implementation in the
image-compressor.ts
is not the most elegant. If converting from one file format to another format or having different tools to convert one format becomes a more common thing with this application, it could probably use a more maintainable approach than the one I used for webp.I did not use the latest version of
cwebp-bin
, this is because I was running into this issue documented here. The latest version that works without that bug isv6.1.2
.I'm not partial to any choices I made on this feature, by all means make edits to this feature that are more in line with this application as a whole.
closes #23