From e4c9a53c3b0e5b5881d4b1e1a1c667bb83379137 Mon Sep 17 00:00:00 2001 From: awalol Date: Fri, 3 May 2024 16:17:32 +0800 Subject: [PATCH] fix: wrong png header --- internal/sniff/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sniff/image.go b/internal/sniff/image.go index ed567a0..502961b 100644 --- a/internal/sniff/image.go +++ b/internal/sniff/image.go @@ -3,7 +3,7 @@ package sniff // ref: https://mimesniff.spec.whatwg.org var imageMIMEs = map[string]Sniffer{ "image/jpeg": prefixSniffer{0xFF, 0xD8, 0xFF}, - "image/png": prefixSniffer{'P', 'N', 'G', '\r', '\n', 0x1A, '\n'}, + "image/png": prefixSniffer{0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n'}, "image/bmp": prefixSniffer("BM"), "image/webp": prefixSniffer("RIFF"), "image/gif": prefixSniffer("GIF8"),