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

[gatsby-plugin-sharp] add option to use mozjpeg #8621

Merged
merged 2 commits into from
Oct 3, 2018

Conversation

Fetten
Copy link
Contributor

@Fetten Fetten commented Sep 28, 2018

This PR adds an option to use MozJPEG for image compression.
As proposed in #8556 we use an environmental variable GATSBY_JPEG_ENCODER=MOZJPEG for this.

The PR finished the already closed WIP PR #5682 and fixes PR #8586.

@pieh
Copy link
Contributor

pieh commented Oct 3, 2018

This looks good, pushed merge commit to force restart tests that were broken few days ago and will be testing locally with feature flag enabled

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Fetten!

@pieh pieh merged commit 10bc679 into gatsbyjs:master Oct 3, 2018
pieh pushed a commit that referenced this pull request Oct 16, 2018
* update lockfile after imagemin-mozjpeg was added to gatsby-plugin-sharp/package.json in #8621

* sizes for srcSet can be configured

* use ternary

* add check to see if array exists

* change name to customSizes

* add documentation and description

* add test for custom sizes

* remove unnecessary array cloning

* change name to srcSetBreakpoints

* throw on negative value in srcSetBreakpoints

* ensure maxWidth is in the breakpoints

* add test to check that no breakpoints wider than the original width are added

* ensure no duplicate breakpoints are added

* ensure that maxWidth is a positive int

* check for 0 as well as negative ints

* expand documentation to let user know maxWidth will be added srcSetBreakpoints

* fix error message
jedrichards pushed a commit to jedrichards/gatsby that referenced this pull request Nov 1, 2018
* update lockfile after imagemin-mozjpeg was added to gatsby-plugin-sharp/package.json in gatsbyjs#8621

* sizes for srcSet can be configured

* use ternary

* add check to see if array exists

* change name to customSizes

* add documentation and description

* add test for custom sizes

* remove unnecessary array cloning

* change name to srcSetBreakpoints

* throw on negative value in srcSetBreakpoints

* ensure maxWidth is in the breakpoints

* add test to check that no breakpoints wider than the original width are added

* ensure no duplicate breakpoints are added

* ensure that maxWidth is a positive int

* check for 0 as well as negative ints

* expand documentation to let user know maxWidth will be added srcSetBreakpoints

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

Successfully merging this pull request may close these issues.

2 participants