webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.
https://docs.webp.sh
GNU General Public License v3.0
1.79k stars 173 forks source link

Cropping mode environment variable #327

Closed BabyDino closed 4 months ago

BabyDino commented 5 months ago

Is your feature request related to a problem? Please describe. According to this article, I understand the cropping solution based on vips is InterestingAll. I was using a custom solution with nginx and image_filter, and this crops automatically using the equivalent of InterestingCentre.

Describe the solution you'd like Support for InterestingCentre, maybe with a extra param like crop=center? Or maybe via an environment variable ENABLE_EXTRA_PARAMS_CROP_MODE?

Describe alternatives you've considered

Additional context Thanks for this wonderful piece of software and thank you for your consideration!

n0vad3v commented 5 months ago

Nice idea, I've created a PR https://github.com/webp-sh/webp_server_go/pull/328 for this.

BabyDino commented 5 months ago

That's blazing fast guys, amazing and thanks for your consideration!

n0vad3v commented 5 months ago

@BabyDino PR is merged and we've released 0.11.2, please have a try to see if its working as intended. Docs:

BabyDino commented 4 months ago

Looks good! Fantastic work, thanks.