You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shortcut 051acc89c3
fix return
8 months ago
caddy fix import path 2 years ago
.gitignore working version 2 years ago
.goreleaser.yml add:.goreleaser.yml 3 years ago
README.md update:README.md 3 years ago
caddywebp.go fix return 8 months ago

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!