Added webp to mimetypes

This commit is contained in:
dtookey 2022-07-27 13:56:41 -04:00
parent 355021634f
commit dc8cf44870

View File

@ -231,6 +231,8 @@ func GuessMimetype(filePath string) string {
return "image/png" return "image/png"
case "svg": case "svg":
return "image/svg+xml" return "image/svg+xml"
case "webp":
return "image/webp"
default: default:
log.Default().Printf("[WARN] '%s' is unrecognized MimeType. Returning as [application/octet-stream]. Please use VinegarServlet.AddMimeType() to define the appropriate response for this file extension.", ext) log.Default().Printf("[WARN] '%s' is unrecognized MimeType. Returning as [application/octet-stream]. Please use VinegarServlet.AddMimeType() to define the appropriate response for this file extension.", ext)
return "application/octet-stream" return "application/octet-stream"