The math here is quite forgiving
This commit is contained in:
parent
a6e6a7d741
commit
527a1551cf
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue