diff --git a/ui/public/load_error.png b/ui/public/load_error.png new file mode 100644 index 00000000000..695abfd885e Binary files /dev/null and b/ui/public/load_error.png differ diff --git a/ui/src/components/markdown/MdRenderer.vue b/ui/src/components/markdown/MdRenderer.vue index 8515ab7c95e..d45f04a9679 100644 --- a/ui/src/components/markdown/MdRenderer.vue +++ b/ui/src/components/markdown/MdRenderer.vue @@ -43,7 +43,15 @@ config({ markdownItConfig(md) { md.renderer.rules.image = (tokens, idx, options) => { tokens[idx].attrSet('style', 'display:inline-block;min-height:33px;padding:0;margin:0') - tokens[idx].attrSet('onerror', 'this.src="/load_error.png"') + tokens[idx].attrSet( + 'onerror', + ` + this.onerror=null; + if(!this.src.endsWith("load_error.png")){ + this.src="./load_error.png"; + } + `, + ) return md.renderer.renderToken(tokens, idx, options) }