diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx index 36715a3bdd..f5841427e4 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -349,9 +349,8 @@ function interpolateTransform( let initialScale = thumbnailDims.width / screenSize.width const imageAspect = imageDims.width / imageDims.height - const finalWidth = screenSize.width - const finalHeight = finalWidth / imageAspect - if (initialScale * finalHeight < thumbnailDims.height) { + const thumbAspect = thumbnailDims.width / thumbnailDims.height + if (imageAspect > 1 && thumbAspect < 1) { initialScale = initialScale * imageAspect }