fix(ui): fix missing images on reload issue

- Mainly an issue for commercial due to incomplete metadata handling
This commit is contained in:
psychedelicious 2023-05-10 00:14:32 +10:00
parent fe8b5193de
commit 2848c8397c

View File

@ -60,8 +60,8 @@ const CurrentImagePreview = () => {
<Image
onDragStart={handleDragStart}
src={shouldHidePreview ? undefined : getUrl(image.url)}
width={image.metadata.width}
height={image.metadata.height}
width={image.metadata.width || 'auto'}
height={image.metadata.height || 'auto'}
fallback={shouldHidePreview ? <CurrentImageHidden /> : undefined}
sx={{
objectFit: 'contain',