MonstreX / voyager-extension

Laravel: Voyager Extension
Other
71 stars 28 forks source link

How to resize uploaded photos #39

Closed edge104 closed 2 years ago

edge104 commented 2 years ago

In which file can I use registerMediaConversions() to resize uploaded photos ?

MonstreX commented 2 years ago

Voyager Extension uses as is the original Medialibrary package. It means you have to read Medialibary documentation to solve your needs and handle all Medialibrary functionality. VE uses only limited options like add, remove, and sort media items using the Medialibrary package. Read this: https://spatie.be/docs/laravel-medialibrary/v10/converting-images/defining-conversions#content-using-model-properties-in-a-conversion

wlaskovic commented 2 years ago

Is there a solution for showing thumbnail image in the edit of VE Image? My approach is that I'd like to convert the original image, and after upload to delete it, for cleaning up free space.

MonstreX commented 2 years ago

Sorry but VE doesn't provide any transformations with loaded images. All mentioned functionality utilizes Media-Library package: https://spatie.be/docs/laravel-medialibrary/v10/converting-images/defining-conversions.