diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index fc797ea..2428788 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -2,7 +2,7 @@ package handlers import ( "fmt" - "image/png" + "image/jpeg" "justcaptcha/internal/captcha" pcaptcha "justcaptcha/pkg/captcha" "justcaptcha/pkg/server" @@ -38,7 +38,7 @@ func (h *CaptchaHandlers) Image(w http.ResponseWriter, r *http.Request) { w.Header().Add("Content-Disposition", "inline; filename=\""+string(captchaID)+"\"") - png.Encode(w, *captchaImage) + jpeg.Encode(w, *captchaImage, &jpeg.Options{Quality: 20}) } func (h *CaptchaHandlers) Solve(w http.ResponseWriter, r *http.Request) {