@jackbarham Can you not do it in a custom storage callback?
https://nova.laravel.com/docs/1.0/resources/file-fields.html#customizing-the-entire-storage-process
I'm trying crop images once they upload, then save to newly cropped image to S3. I have all working expect the image cropping.
I don't see anything on the documentation about being able to crop images at the server end, is it this even possible?
I know there's a front-end Nova package for cropping images before upload, but I'd like to process image cropping (ideally with Image Intervention) at the server level.
An example would be:
Avatar::make('Image Large')
->hideFromIndex()
->disk('s3_image')
->storeAs(function (Request $request) {
Image::make($request->image_large)->fit(280, 720, function ($c) {
$c->upsize();
})->encode('jpg', 80);
})
->rules('required')
->prunable(),
Has anyone got it working yet?
Please or to participate in this conversation.