Any HTML/JS image editor which could be loaded in the webviewer?

Hi, I have been trying to implement an image editor, especially the crop function (with ratios 1:1, 4:6, 6:4).
I looked everywhere for an extension, but the ones I’ve found doesn’t have my required ratios. So then I tried displaying an online image editor service, then removing unwanted components using Evaluate JS component. But then I would be displaying a third party service without their permission. Then I looked for open source html/js image editors, one of which I like :GitHub - scaleflex/filerobot-image-editor: Edit, resize, and filter any image!
Because I can change the width and height of crop box. But I can’t seem to upload local files for editing.
Can anyone suggest a workaround for this? The main thing is I need to implement an image editor, via which the user could upload an image, select the area to crop (with ratio set by me) and then save it? My whole project is stuck due to this cropping problem… I’ve been trying to do this for almost 1 week now…