diff --git a/web/client/components/misc/SecureImage.jsx b/web/client/components/misc/SecureImage.jsx
index dc6bc3810d..649031d18c 100644
--- a/web/client/components/misc/SecureImage.jsx
+++ b/web/client/components/misc/SecureImage.jsx
@@ -57,7 +57,11 @@ const SecureImage = ({
return (
{
+ if (imageSrc) {
+ props.onImgError(e);
+ }
+ }}
onLoad={(e) => validateImg(e.target)}
src={imageSrc}
style={props.style}
diff --git a/web/client/plugins/TOC/components/Legend.jsx b/web/client/plugins/TOC/components/Legend.jsx
index 4274a356b8..9646c8c71a 100644
--- a/web/client/plugins/TOC/components/Legend.jsx
+++ b/web/client/plugins/TOC/components/Legend.jsx
@@ -121,7 +121,7 @@ class Legend extends React.Component {
const url = this.getUrl(this.props);
return (
this.validateImg(e.target)}
src={url}
style={this.props.style}