Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ func imageHandler(w http.ResponseWriter, r *http.Request, buf []byte, operation
}
}

// Use magick to process bmp image
if mimeType == "image/bmp" {
mimeType = "image/magick"
}

// Infer text/plain responses as potential SVG image
if strings.Contains(mimeType, "text/plain") && len(buf) > 8 {
if bimg.IsSVGImage(buf) {
Expand Down