@@ -34,6 +34,8 @@ PreviewWidget {
3434
3535 property Item rootItem: QuickUtils.rootItem(root)
3636
37+ readonly property var imageUrl: widgetData["source"] || widgetData["fallback"] || ""
38+
3739 LazyImage {
3840 id: lazyImage
3941 objectName: "lazyImage"
@@ -42,7 +44,7 @@ PreviewWidget {
4244 right: parent.right
4345 }
4446 scaleTo: "width"
45− source: widgetData["source"] || widgetData["fallback"] || ""
47+ source: root.imageUrl
4648 asynchronous: true
4749 useUbuntuShape: false
4850 pressed: mouseArea.pressed
@@ -59,11 +61,12 @@ PreviewWidget {
5961
6062 Connections {
6163 target: lazyImage.sourceImage
62− // If modelData would change after failing to load it would not be
63− // reloaded since the source binding is destroyed by the source = fallback
64− // But at the moment the model never changes
6564 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
6665 }
66+ Connections {
67+ target: root
68+ onImageUrlChanged: lazyImage.sourceImage.source = root.imageUrl;
69+ }
6770
6871 PreviewMediaToolbar {
6972 id: toolbar
@@ -86,12 +89,14 @@ PreviewWidget {
8689
8790 delegate: ZoomableImage {
8891 anchors.fill: parent
89− source: widgetData["source"] || widgetData["fallback"] || ""
92+ source: root.imageUrl
9093 zoomable: widgetData["zoomable"] ? widgetData["zoomable"] : false
91− // If modelData would change after failing to load it would not be
92− // reloaded since the source binding is destroyed by the source = fallback
93− // But at the moment the model never changes
9494 onStatusChanged: if (status === Image.Error) source = widgetData["fallback"];
95+
96+ Connections {
97+ target: root
98+ onImageUrlChanged: source = root.imageUrl;
99+ }
95100 }
96101 }
97102}