Only scale image bigger than 512px (#731)

This commit is contained in:
Ajay Bura 2022-08-11 13:33:54 +05:30
parent 20e1df43d0
commit ce1e263d57
2 changed files with 5 additions and 0 deletions

View file

@ -41,11 +41,13 @@ function ImagePackUpload({ onUpload }) {
const img = evt.target.files[0];
if (!img) return;
setImgFile(img);
shortcodeRef.current.value = img.name.slice(0, img.name.indexOf('.'));
shortcodeRef.current.focus();
};
const handleRemove = () => {
setImgFile(null);
inputRef.current.value = null;
shortcodeRef.current.value = '';
};
return (