F
Filament4mo ago
CGM

SpatieMediaLibraryFileUpload - Display is very slow

I'm allowing users to upload images. However, I want to keep a high quality version for future cropping. How can I display a conversion (ie., thumbnail) in the field, but allow cropping of the original in the editor? The reason this is important is that some users have images that are 10+mb and the editor is taking for ever to load on mobile. I don't need the full image unless the editor is actively open.
SpatieMediaLibraryFileUpload::make('user_photo')
->collection('user_photos')
->disk('tenant_photos')
->maxSize(12288)
->visibility('public')
->image()
->imageEditor()
->imageCropAspectRatio('2:3'),
SpatieMediaLibraryFileUpload::make('user_photo')
->collection('user_photos')
->disk('tenant_photos')
->maxSize(12288)
->visibility('public')
->image()
->imageEditor()
->imageCropAspectRatio('2:3'),
when I add ->conversion('thumb') the editor/cropper modifies the thumbnail instead of the original, obliterating the image quality.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server