dmitrybubyakin / nova-medialibrary-field

Laravel Nova field for managing the Spatie media library
MIT License
262 stars 62 forks source link

Cropping validation #180

Open bogdan-kocic opened 1 year ago

bogdan-kocic commented 1 year ago

Since cropperjs properties minCropBoxWidth and minCropBoxHeight are relative to the page not the image itself, it makes it unusable. And since there is no validation on the image after crop. Is there a way to validate minimum image dimensions for cropped image? Am I missing something in the docs or there is no way of doing this rn? I was able to make work around using media library ConversionHasBeenCompledet event by checking if the image dimensions are valid and if not, pruning manipulations column and rerunning conversions. But it is too heavy since it has to run the conversion 2 times. Did somebody found a solution? It should be fairly easy fix.