diff --git a/app/Resources/Viewer/scripts/discord.js b/app/Resources/Viewer/scripts/discord.js
index 0cc85d3..d282ad4 100644
--- a/app/Resources/Viewer/scripts/discord.js
+++ b/app/Resources/Viewer/scripts/discord.js
@@ -128,12 +128,12 @@ const DISCORD = (function() {
// noinspection HtmlUnknownTarget
templateEmbedImage = new TEMPLATE([
- "
"
+ "
"
].join(""));
// noinspection HtmlUnknownTarget
templateEmbedImageWithSize = new TEMPLATE([
- "
"
+ "
"
].join(""));
// noinspection HtmlUnknownTarget
@@ -164,6 +164,12 @@ const DISCORD = (function() {
].join(""));
},
+ handleImageLoadError(ele) {
+ // noinspection JSUnusedGlobalSymbols
+ ele.onerror = null;
+ ele.setAttribute("alt", "(image attachment not found)");
+ },
+
isImageAttachment(attachment) {
const dot = attachment.url.lastIndexOf(".");
const ext = dot === -1 ? "" : attachment.url.substring(dot).toLowerCase();