diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js
index 28a087f77d..8251af1a5d 100644
--- a/src/components/views/elements/ImageView.js
+++ b/src/components/views/elements/ImageView.js
@@ -169,6 +169,15 @@ export default class ImageView extends React.Component {
});
}
+ onDownloadClick = (ev) => {
+ ev.preventDefault();
+ ev.stopPropagation();
+ const a = document.createElement("a");
+ a.href = this.props.src;
+ a.download = this.props.name;
+ a.click();
+ }
+
onPanelClick = (ev) => {
this.props.onFinished();
}
@@ -281,13 +290,11 @@ export default class ImageView extends React.Component {
title={_t("Zoom in")}
onClick={ this.onZoomInClick }>
-
-
+ onClick={ this.onDownloadClick }>
+