Skip to content

Commit ef83e95

Browse files
committed
Add smart_subsample argument to the webp_options processing option
1 parent 8be3289 commit ef83e95

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
-->
44
# Changelog
55

6+
## [Unreleased]
7+
### Added
8+
- Add `smart_subsample` argument to the `webp_options` processing option.
9+
610
## [3.0.0] - 2023-12-28
711

812
⚠️ This is a major release. See [the migration guide](https://github.com/imgproxy/imgproxy.rb/blob/master/UPGRADE.md). ⚠️

lib/imgproxy/options_casters/webp_options.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module OptionsCasters
99
module WebpOptions
1010
CASTER = Imgproxy::OptionsCasters::Group.new(
1111
compression: Imgproxy::OptionsCasters::String,
12+
smart_subsample: Imgproxy::OptionsCasters::Bool,
1213
).freeze
1314

1415
def self.cast(raw)

spec/url_for_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
},
179179
webp_options: {
180180
compression: "lossless",
181+
smart_subsample: true,
181182
},
182183
format: :webp,
183184
page: 42,
@@ -268,7 +269,7 @@
268269
"mb:1024",
269270
"jpego:1:0:1:0:1:5",
270271
"pngo:0:1:128",
271-
"webpo:lossless",
272+
"webpo:lossless:1",
272273
"pg:42",
273274
"pgs:2",
274275
"da:1",
@@ -342,7 +343,7 @@
342343
"max_bytes:1024",
343344
"jpeg_options:1:0:1:0:1:5",
344345
"png_options:0:1:128",
345-
"webp_options:lossless",
346+
"webp_options:lossless:1",
346347
"page:42",
347348
"pages:2",
348349
"disable_animation:1",

0 commit comments

Comments
 (0)