Skip to content

Fixes to image manipulation parameters#369

Merged
eduardoboucas merged 5 commits intodevelopfrom
patch/image-param-fixes
Jun 4, 2018
Merged

Fixes to image manipulation parameters#369
eduardoboucas merged 5 commits intodevelopfrom
patch/image-param-fixes

Conversation

@eduardoboucas
Copy link
Copy Markdown
Contributor

What's included:

  1. When width and height are supplied, the current default resize style is entropy. The reason being that, if the image will be cropped, we're better off supplying a meaningful crop when no other parameters are supplied. However, when gravity is supplied, that should take precedence over the entropy-based crop. For this reason, aspectfill becomes the default resize style when width, height and gravity are supplied.

  2. A fix for a regression introduced in version 2.0 that ignored the dpr parameter unless the resize style was set to crop. The parameter is now taken into account regardless of the resize style being used.

  3. A npmignore file removing dev-only assets, like the test directory which weighs ~20MB, from the published module.

Visual regression tests for points 1. and 2. are included.

/cc @fra967

Copy link
Copy Markdown
Contributor

@jimlambie jimlambie left a comment

Choose a reason for hiding this comment

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

🎈

@eduardoboucas
Copy link
Copy Markdown
Contributor Author

@jimlambie Updated URLs in the README. Happy for it to be released as 3.0.1?

@jimlambie
Copy link
Copy Markdown
Contributor

@eduardoboucas LGTM 🎈

@eduardoboucas eduardoboucas merged commit a9456bb into develop Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants