diff --git a/library/src/main/java/ru/noties/markwon/spans/AsyncDrawable.java b/library/src/main/java/ru/noties/markwon/spans/AsyncDrawable.java index 1593e60d..42dce54a 100644 --- a/library/src/main/java/ru/noties/markwon/spans/AsyncDrawable.java +++ b/library/src/main/java/ru/noties/markwon/spans/AsyncDrawable.java @@ -189,10 +189,10 @@ public class AsyncDrawable extends Drawable { final ImageWidth imageWidth = imageConfig.getImageWidth(); if (imageWidth == ImageWidth.MatchParent) { - final float aspectRatio = (float) bounds.width() / bounds.height(); + final float growthRatio = (float) canvasWidth / bounds.width(); bounds.left = 0; bounds.right = canvasWidth; - bounds.bottom = (int) (bounds.top + bounds.height() * aspectRatio); + bounds.bottom = (int) (bounds.top + bounds.height() * growthRatio); } else { switch (gravity) { case Left: