imagemin-webp icon indicating copy to clipboard operation
imagemin-webp copied to clipboard

Resize using only one property

Open busybox11 opened this issue 2 years ago • 2 comments

Hi, I'm trying to use this webpack module to resize images using a defined height. Though all of these images don't have the same width and I'd like to keep the original aspect ratio. I searched in the docs if that was possible but it seems not. Giving a single property to the resize object (for example, width), errors out saying that the other one is undefined. Maybe I am mistaken but if that's not the case, could it be possible to integrate an option like this? Thanks in advance!

busybox11 avatar Jul 07 '22 09:07 busybox11

set 0 for auto.

resize: { width: 100, height: 0 }
resize: { width: 0, height: 100 }

mobiliabrus avatar Jul 16 '22 06:07 mobiliabrus

Thank you! This should definitely be added to the README. Going to test this out soon, thanks for your help!

busybox11 avatar Jul 16 '22 12:07 busybox11