diff --git a/src/calibre/ebooks/mobi/writer2/resources.py b/src/calibre/ebooks/mobi/writer2/resources.py index 710c510374..f75ba43aa4 100644 --- a/src/calibre/ebooks/mobi/writer2/resources.py +++ b/src/calibre/ebooks/mobi/writer2/resources.py @@ -27,9 +27,11 @@ def process_jpegs_for_amazon(data: bytes) -> bytes: # Amazon's MOBI renderer can't render JPEG images without JFIF metadata # and images with EXIF data dont get displayed on the cover screen changed = not img.info - if hasattr(img, '_getexif') and img._getexif(): - changed = True - img = ImageOps.exif_transpose(img) + if hasattr(img, 'getexif'): + exif = img.getexif() + if exif.get(0x0112) in (2,3,4,5,6,7,8): + changed = True + img = ImageOps.exif_transpose(img) if changed: out = BytesIO() img.save(out, 'JPEG')