Skip to content

Commit

Permalink
Add skip-if-larger params for pngquant
Browse files Browse the repository at this point in the history
The `pngquant` worker will not allow bigger files, but adding the
`--skip-if-larger` flag should make it fail faster. Added a changelog
entry.

Co-authored-by: Blake Erickson <[email protected]>
  • Loading branch information
2 people authored and toy committed Oct 25, 2020
1 parent 3470d97 commit ff17b67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## unreleased

* Add `--skip-if-larger` flag to pngquant worker. The pngquant worker already does this, but this will make it fail faster. [#125](https://github.com/toy/image_optim/pull/125) [#181](https://github.com/toy/image_optim/pull/181) [@iggant][https://github.com/iggant] [@oblakeerickson][https://github.com/oblakeerickson]

## v0.27.1 (2020-09-30)

* Fixed atomic replacement for case when equal `File::Stat#dev` doesn't mean that file can be linked [#180](https://github.com/toy/image_optim/issues/180) [@toy](https://github.com/toy)
Expand Down
1 change: 1 addition & 0 deletions lib/image_optim/worker/pngquant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def optimize(src, dst)
--quality=#{quality.begin}-#{quality.end}
--speed=#{speed}
--output=#{dst}
--skip-if-larger
--force
#{max_colors}
--
Expand Down

0 comments on commit ff17b67

Please sign in to comment.