studiobloom / opti-webp

Opti-WebP bulk resizes, compresses and converts non WebP images to an optimized WebP final version
MIT License
22 stars 2 forks source link

Set different max for width and height? #1

Open LucyI opened 1 week ago

LucyI commented 1 week ago

First off I just want to say thank you for such a useful program. I think it will save me a lot of time.

I have a feature request that I think would make it much more flexible. Would love to be able to set the max width and max height independently of each other. So something like entering 2000/1200 would produce images that are not wider than 2000 or higher than 1200.

Iterating on that idea, the ability to tell it to ignore one of the dimensions would be even more useful. So that you could, for instance, drop in a bunch of images of both horizontal and portrait orientations, and enter */1800 to make them all 1800px high whether the width ends up being greater than or less than 1800px. (Always maintaining aspect ratio of course.)

I have no idea if this is possible or not. But anyway, thanks again for this!

studiobloom commented 1 week ago

hey @LucyI thanks for the feedback, im glad this tool has been helping out:)

as for the max width/height the reason i went with this method is so that the aspect ratio of the images stay locked, but i will revisit the script today to see what could be done!