From 527a1551cf236e2fb5b07899be0761d7d907efa0 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Wed, 19 Jun 2024 23:34:19 +0800 Subject: [PATCH] The math here is quite forgiving --- src/components/media.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/media.jsx b/src/components/media.jsx index a231d63f..2e0db047 100644 --- a/src/components/media.jsx +++ b/src/components/media.jsx @@ -375,7 +375,7 @@ function Media({ const displayNaturalHeight = (naturalHeight * clientWidth) / naturalWidth; const almostSimilarHeight = - Math.abs(displayNaturalHeight - clientHeight) < 2; + Math.abs(displayNaturalHeight - clientHeight) < 5; if (almostSimilarHeight) { setHasNaturalAspectRatio(true);