diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index fea3eaefcacb053bbff4a31cc509f507fc145498..7664d6fdc1e0db6cfbac879e276aca9546d9ed96 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -19,7 +19,9 @@ Item {
     required property string eventId
     property double divisor: isReply ? 5 : 3
 
-    implicitWidth: Math.round(originalWidth*Math.min((timelineView.height/divisor)/(originalWidth*proportionalHeight), 1))
+    property int tempWidth: originalWidth < 1? 400: originalWidth
+
+    implicitWidth: Math.round(tempWidth*Math.min((timelineView.height/divisor)/(tempWidth*proportionalHeight), 1))
     width: Math.min(parent.width,implicitWidth)
     height: width*proportionalHeight