It's a fork of quill-image-resize-module, the "Crop" module resize the images with a canvas and produce lighter images. That makes all the difference!
With each modification, a canvas is generated at the right dimensions with the original image and generated a shorter data URL than if the image had kept excessive dimensions. Note that if the image is enlarged, the actual image will be at the base size.
Include my js file version
<script src="/quill-image-resize-module/image-resize.min.js"></script>You just have to include the submodule "Crop" in the module "imageResizes:
const quill = new Quill(editor, {
// ...
modules: {
// ...
imageResize: {
modules: [ 'Crop'/*, ... */ ]
}
}
});