In a ConstraintLayout, an ImageView is bound to its parent in such a way that:
ConstraintLayout
ImageView
Its left side is bound to the screen\'s left side
I think that you can use app:layout_constraintDimensionRatio="your ratio" to keep the aspect ratio if your image
app:layout_constraintDimensionRatio="your ratio"
For example, if you want square you need the same width and height so use - app:layout_constraintDimensionRatio="1:1"
app:layout_constraintDimensionRatio="1:1"