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.84k stars 175 forks source link

Exclude certain sub folder #300

Open pixiemediaweb opened 11 months ago

pixiemediaweb commented 11 months ago

Is it possible to exclude certain folders?

My config has;

{ "HOST": "127.0.0.1", "PORT": "3333", "QUALITY": "80", "IMG_PATH": "/var/www/live/pub", "EXHAUST_PATH": "/var/www/webpcache", "IMG_MAP": {}, "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg","heic","nef"], "ENABLE_AVIF": false, "ENABLE_EXTRA_PARAMS": false "READ_BUFFER_SIZE": 4096, "CONCURRENCY": 262144, "DISABLE_KEEPALIVE": false }

But id like it to exclude images that live in /var/www/live/pub/some-folder

Is this possible?

n0vad3v commented 11 months ago

Currently there is no way to do this on WebP Server Go, however there are some workarounds: