diff --git a/app/internal_packages/message-autoload-images/lib/autoload-images-extension.ts b/app/internal_packages/message-autoload-images/lib/autoload-images-extension.ts index cee094b32..5efb84d2b 100644 --- a/app/internal_packages/message-autoload-images/lib/autoload-images-extension.ts +++ b/app/internal_packages/message-autoload-images/lib/autoload-images-extension.ts @@ -4,9 +4,13 @@ import AutoloadImagesStore from './autoload-images-store'; export default class AutoloadImagesExtension extends MessageViewExtension { static formatMessageBody = ({ message }) => { if (AutoloadImagesStore.shouldBlockImagesIn(message)) { - message.body = message.body.replace(AutoloadImagesStore.ImagesRegexp, (match, prefix) => { - return `${prefix}#`; - }); + message.body = message.body.replace(AutoloadImagesStore.getLinkTagRegexp(), ''); + message.body = message.body.replace( + AutoloadImagesStore.getImagesRegexp(), + (match, prefix) => { + return `${prefix}#`; + } + ); } }; }