Skip to content
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

Parcel 2: MozJPEG Optimizer #3733

Closed
devongovett opened this issue Nov 3, 2019 · 2 comments
Closed

Parcel 2: MozJPEG Optimizer #3733

devongovett opened this issue Nov 3, 2019 · 2 comments

Comments

@devongovett
Copy link
Member

Create the @parcel/optimizer-mozjpeg package. This should include an Optimizer plugin that compresses JPEG images with mozjpeg. Ideally, this should wrap a C++ module to call mozjpeg rather than relying on writing temporary files and calling command line tools. Perhaps such a module already exists, otherwise we should create one. If this proves too difficult, shelling out to a command line tool could be a good starting point.

This plugin should be included in @parcel/config-default for *.{jpg,jpeg} to optimize JPEGs by default in production. (??)

Configuration

Optional configuration should be done through a .mozjpegrc file. We should include good default settings, but it should be possible to override them if needed. See here for available options.

@hsablonniere
Copy link

Hello,

  • I just created a local plugin to do that in my own project.
  • I don't have any tests.
  • I don't use any configuration file.

I may have some time to help on this but I need some guidance 😉

@devongovett
Copy link
Member Author

This is implemented in the default image optimizer plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants