diff --git a/src/settings/enums/ImageSize.ts b/src/settings/enums/ImageSize.ts index f7dcee91db1..ed59723d043 100644 --- a/src/settings/enums/ImageSize.ts +++ b/src/settings/enums/ImageSize.ts @@ -50,7 +50,7 @@ export function suggestedSize(size: ImageSize, contentSize: Dimensions, maxHeigh h: maxHeight ? Math.min(maxSize.h, contentSize.h, maxHeight) : Math.min(maxSize.h, contentSize.h), }; - if (constrainedSize.h * aspectRatio < constrainedSize.w || size === ImageSize.Large) { + if (constrainedSize.h * aspectRatio < constrainedSize.w) { // Height dictates width return { w: constrainedSize.h * aspectRatio, h: constrainedSize.h }; } else { diff --git a/test/settings/enums/ImageSize-test.ts b/test/settings/enums/ImageSize-test.ts index ead192c2ec1..97da1fbe20e 100644 --- a/test/settings/enums/ImageSize-test.ts +++ b/test/settings/enums/ImageSize-test.ts @@ -26,9 +26,9 @@ describe("ImageSize", () => { const size = suggestedSize(ImageSize.Normal, { w: 162, h: 648 }); expect(size).toStrictEqual({ w: 81, h: 324 }); }); - it("does not constrain width in large mode", () => { + it("constrains width in large mode", () => { const size = suggestedSize(ImageSize.Large, { w: 2400, h: 1200 }); - expect(size).toStrictEqual({ w: 1200, h: 600 }); + expect(size).toStrictEqual({ w: 800, h: 400 }); }); it("returns max values if content size is not specified", () => { const size = suggestedSize(ImageSize.Normal, { w: null, h: null });