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 174 forks source link

Add SVG support for proxy mode #258

Closed n0vad3v closed 1 year ago

n0vad3v commented 1 year ago

Fix issue: https://github.com/webp-sh/webp_server_go/issues/257

Example config.json

{
  "HOST": "0.0.0.0",
  "PORT": "3333",
  "QUALITY": "80",
  "IMG_PATH": "https://dev.w3.org",
  "EXHAUST_PATH": "./exhaust",
  "ALLOWED_TYPES": ["jpg","png","jpeg","bmp","svg"],
  "ENABLE_AVIF": false,
  "ENABLE_EXTRA_PARAMS": true
}

Now visiting http://localhost:3333/SVG/tools/svgweb/samples/svg-files/AJ_Digital_Camera.svg should give the webp image output.