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

Adds JPEG XL support, max_height/max_width support #321

Closed n0vad3v closed 5 months ago

n0vad3v commented 6 months ago

This is PR contains the following changes:

Changes

Config file changes

For the config.json part, the new config.json will be in the following format:

{
  "HOST": "127.0.0.1",
  "PORT": "3333",
  "QUALITY": "80",
  "IMG_PATH": "./pics",
  "EXHAUST_PATH": "./exhaust",
  "IMG_MAP": {},
  "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg","heic","nef"],
  "CONVERT_TYPES": ["webp","avif","jxl"],
  "STRIP_METADATA": true,
  "ENABLE_EXTRA_PARAMS": false
  "READ_BUFFER_SIZE": 4096,
  "CONCURRENCY": 262144,
  "DISABLE_KEEPALIVE": false,
  "CACHE_TTL": 259200,
}

Note: STRIP_METADATA, CONVERT_TYPES are newly added, ENABLE_AVIF is removed.

github-actions[bot] commented 6 months ago

ghcr.io/webp-sh/webp_server_go (debian 12.5)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)