Using the ImageEditor with an inline Dashboard shows the edit button, but when editing the edit functionality is just broken. And images are shown in their original size. Zoom is not working.
I am not sure if it's relevant but I am using nextjs on the frontend.

import React, { FunctionComponent, useState, useEffect } from 'react'
import Uppy from '@uppy/core'
import ImageEditor from '@uppy/image-editor'
import { Dashboard } from '@uppy/react'
const ImageUpload: FunctionComponent<Props> = (props, {}) => {
const [uppy, setUppy] = useState(null)
useEffect(() => {
const uppyOptions = {
autoProceed: false,
restrictions: {
maxFileSize: 5000000,
maxNumberOfFiles: props.maxNumberOfFiles || 10,
minNumberOfFiles: 1,
allowedFileTypes: ['image/*'],
},
}
const uppy = Uppy(uppyOptions)
setUppy(uppy)
uppy.use(ImageEditor, {
id: 'ImageEditor',
cropperOptions: {
viewMode: 1,
background: true,
autoCropArea: 1,
responsive: true,
},
})
uppy.on('complete', () => {})
}, [false])
if (!uppy) return null
return (
<S.Dashboard__Container data-uppy-theme="dark">
<Dashboard
uppy={uppy}
plugins={['ImageEditor']}
metaFields={[{ id: 'name', name: 'Name', placeholder: 'File name' }]}
/>
</S.Dashboard__Container>
)
}
export default ImageUpload
"react": "16.12.0",
"react-dom": "^16.12.0",
"next": "^9.4.4",
"@uppy/core": "^1.13.1",
"@uppy/dashboard": "^1.12.5",
"@uppy/image-editor": "^0.1.5",
"@uppy/react": "^1.10.5",
"@uppy/xhr-upload": "^1.5.3",
seems that all I was missing was the css import!
import '@uppy/image-editor/dist/style.css'
Most helpful comment
seems that all I was missing was the css import!
import '@uppy/image-editor/dist/style.css'