diff --git a/src/components/Timeline/Shared/Attachment/dimensions.ts b/src/components/Timeline/Shared/Attachment/dimensions.ts index aa1d3564..ec069b85 100644 --- a/src/components/Timeline/Shared/Attachment/dimensions.ts +++ b/src/components/Timeline/Shared/Attachment/dimensions.ts @@ -9,7 +9,12 @@ export const aspectRatio = ({ width?: number height?: number }): number => { - const cropTooTall = (height || 1) / (width || 1) > 3 / 2 ? 2 / 3 : (width || 1) / (height || 1) + const defaultCrop = + (height || 1) / (width || 1) > 3 / 2 + ? 2 / 3 + : (width || 1) / (height || 1) > 4 + ? 4 + : (width || 1) / (height || 1) const isEven = total % 2 == 0 if (total > 5) { @@ -26,12 +31,12 @@ export const aspectRatio = ({ } else { switch (isEven) { case true: - return cropTooTall + return defaultCrop case false: if ((index || -2) + 1 == total) { - return cropTooTall * 2 + return defaultCrop * 2 } else { - return cropTooTall + return defaultCrop } } }