fix(image): case-insensitive format matching in process_image
This commit is contained in:
parent
8b1b949bf8
commit
2c08c6c7fd
@ -183,8 +183,8 @@ fn process_image(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output format
|
// Output format (case-insensitive)
|
||||||
let output_format = match params.format.as_deref() {
|
let output_format = match params.format.as_deref().map(str::to_lowercase).as_deref() {
|
||||||
Some("webp") => image::ImageFormat::WebP,
|
Some("webp") => image::ImageFormat::WebP,
|
||||||
Some("png") => image::ImageFormat::Png,
|
Some("png") => image::ImageFormat::Png,
|
||||||
Some("jpeg") | Some("jpg") => image::ImageFormat::Jpeg,
|
Some("jpeg") | Some("jpg") => image::ImageFormat::Jpeg,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user