diff --git a/resources/qml/UploadBox.qml b/resources/qml/UploadBox.qml
index ba00f20560112929ff517ed97b3f4374ec166015..ccd59f4505584a4f206f41723e9c515645bf0c98 100644
--- a/resources/qml/UploadBox.qml
+++ b/resources/qml/UploadBox.qml
@@ -48,8 +48,8 @@ Page {
                     Layout.fillHeight: true
                     Layout.fillWidth: true
 
-                    sourceSize.height: height
-                    sourceSize.width: width
+                    sourceSize.height: parent.availableHeight - namefield.height
+                    sourceSize.width: parent.availableWidth
                     fillMode: Image.PreserveAspectFit
                     smooth: true
                     mipmap: true
@@ -63,6 +63,7 @@ Page {
                     source: (modelData.thumbnail != "") ? modelData.thumbnail : ("image://colorimage/:/icons/icons/ui/"+typeStr+".svg?" + Nheko.colors.buttonText)
                 }
                 MatrixTextField {
+                    id: namefield
                     Layout.fillWidth: true
                     text: modelData.filename
                     onTextEdited: modelData.filename = text