Go to file
shortcut c4988518f3 working version 2021-06-28 16:14:59 -04:00
caddy fix import path 2021-06-23 13:13:52 -04:00
.gitignore working version 2021-06-28 16:14:59 -04:00
.goreleaser.yml add:.goreleaser.yml 2020-03-30 09:48:15 +08:00
README.md update:README.md 2020-03-30 10:17:59 +08:00
caddywebp.go working version 2021-06-28 16:14:59 -04:00
go.mod fix import path 2021-06-23 13:13:52 -04:00
go.sum First rev with cache and gif 2021-06-23 13:09:26 -04:00

README.md

Caddy Webp

Caddy2插件——无感的将图片转换为WebP格式。

Get Start

release里有我编译的linux-amd64的Caddy可执行文件其他的平台如下

  1. 克隆本仓库
  2. go build ./caddy/main.go
  3. 将编译得到的新文件替换Caddy原始/usr/bin/caddy
  4. 修改Caddyfile
{ # 全局块
    order webp before file_server # 设置Handler激活顺序缺少将无法启动caddy
}

localhost {
    root * /var/www/
    encode gzip
    webp # <= webp插件在这里启动了
    file_server
}

Just for fun!