I’ve been struggling with making ImageEditor work with my React app.
I have added this to init Uppy:
const uppy = useUppy(() => {
return new Uppy({
id: uniqueId + "-UppyUploader",
restrictions: {
maxFileSize: 10 * 1024 * 1024, // 10 MB
allowedFileTypes: ['.jpg', '.jpeg', '.webp', '.png'],
},
autoProceed: false,
})
.use(ImageEditor, {
id: uniqueId + "-ImageEditorPluginForUppy",
quality: 0.8,
cropperOptions: {
viewMode: 1,
background: false,
autoCropArea: 1,
responsive: true,
croppedCanvasOptions: {},
},
actions: {
cropSquare: true,
cropWidescreen: true,
cropWidescreenVertical: true,
flip: true,
granularRotate: true,
revert: true,
rotate: true,
zoomIn: true,
zoomOut: true
}
})
})
.use(ImageEditor, { id: "UppyImageEditor" })
And then this is my dashboard:
<Dashboard
key={uniqueId + "UppyDashboard"}
id={uniqueId + "UppyDashboard"}
plugins={["ImageEditor",]}
height={300}
hideUploadButton={true}
uppy={uppy}
metaFields={[
{ id: 'name', name: 'Name', placeholder: 'File name' },
]}
/>
</>
However when i upload my image and click on edit I can only change the name.
Did anyone encounter something similar?