From 8e262104c25d1c2578f683109e1b373aade3a17c Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sat, 5 Jun 2021 14:32:19 +0200 Subject: Add Image Diff for SVG files (#14867) * Added type sniffer. * Switched content detection from base to typesniffer. * Added GuessContentType to Blob. * Moved image info logic to client. Added support for SVG images in diff. * Restore old blocked svg behaviour. * Added missing image formats. * Execute image diff only when container is visible. * add margin to spinner * improve BIN tag on image diffs * Default to render view. * Show image diff on incomplete diff. Co-authored-by: silverwind Co-authored-by: Lunny Xiao Co-authored-by: Lauris BH --- modules/avatar/avatar.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/avatar/avatar.go') diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go index bb9c2e953b..5411a90796 100644 --- a/modules/avatar/avatar.go +++ b/modules/avatar/avatar.go @@ -10,8 +10,9 @@ import ( "image" "image/color/palette" - // Enable PNG support: - _ "image/png" + _ "image/gif" // for processing gif images + _ "image/jpeg" // for processing jpeg images + _ "image/png" // for processing png images "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" -- cgit v1.2.3