From 1025bb8b68d7aa4aba1f1259c2c490239dfc3f24 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 30 Oct 2023 21:05:24 -0600 Subject: [PATCH] Don't log when there's no exif data Fixes https://github.com/turt2live/matrix-media-repo/issues/468 --- thumbnailing/u/exif.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thumbnailing/u/exif.go b/thumbnailing/u/exif.go index b6b65176..636831ed 100644 --- a/thumbnailing/u/exif.go +++ b/thumbnailing/u/exif.go @@ -17,6 +17,9 @@ type ExifOrientation struct { func GetExifOrientation(img io.Reader) (*ExifOrientation, error) { rawExif, err := exif.SearchAndExtractExifWithReader(img) if err != nil { + if errors.Is(err, exif.ErrNoExif) { + return nil, nil + } return nil, errors.New("exif: error reading possible exif data: " + err.Error()) }