diff --git a/web_src/js/features/comp/Paste.js b/web_src/js/features/comp/Paste.js index b26296d1fc..aab6997ad5 100644 --- a/web_src/js/features/comp/Paste.js +++ b/web_src/js/features/comp/Paste.js @@ -1,6 +1,4 @@ -import {htmlEscape} from 'escape-goat'; import {POST} from '../../modules/fetch.js'; -import {imageInfo} from '../../utils/image.js'; import {getPastedContent, replaceTextareaSelection} from '../../utils/dom.js'; import {isUrl} from '../../utils/url.js'; @@ -98,17 +96,9 @@ async function handleClipboardImages(editor, dropzone, images, e) { editor.insertPlaceholder(placeholder); const {uuid} = await uploadFile(img, uploadUrl); - const {width, dppx} = await imageInfo(img); const url = `/attachments/${uuid}`; - let text; - if (width > 0 && dppx > 1) { - // Scale down images from HiDPI monitors. This uses the tag because it's the only - // method to change image size in Markdown that is supported by all implementations. - text = `${htmlEscape(name)}`; - } else { - text = `![${name}](${url})`; - } + const text = `![${name}](${url})`; editor.replacePlaceholder(placeholder, text); const input = document.createElement('input');