Add unit tests for JPEG and WebP

Also correct Content-Type when transcoding WebP.
This commit is contained in:
Andrew Gaul
2017-01-17 19:22:05 -08:00
parent 84b6dbd153
commit 20a9c66286
2 changed files with 87 additions and 0 deletions

View File

@ -29,6 +29,7 @@ func (t *Jpeg) Transcode(w *proxy.ResponseWriter, r *proxy.ResponseReader, heade
}
if SupportsWebP(headers) {
w.Header().Set("Content-Type", "image/webp")
options := webp.Options{
Lossless: false,
Quality: float32(t.encOptions.Quality),