The spatie package looks pretty good. But I believe intervention will be fine.
I suggest you try (experiment) with the packages, you can always uninstall the one you don't use.
I've a form with a multiple file input that accept only images (of course I've some validator for the request, etc.). But I'm looking for the best way to optimize the files during the upload method so they doesn't :
private function upload_files($file, $table_id) {
$myImagesTable = new MyImagesTable;
$myImagesTable-> table_id = $table_id;
$myImagesTable->name = $file->store('images', 'public'); // During this process I need to optimize the image
if(!$myImagesTable->save()) {
return back()->with('error', __('An error occurred... Please try again later'));
}
}
I've check some of the following solutions:
I don't care that the images have the best quiality (even tho I do care that the optimization process doesn't affect the quality THAT much).
I really want to hear your opinion before making a chooice. Thanks
The spatie package looks pretty good. But I believe intervention will be fine.
I suggest you try (experiment) with the packages, you can always uninstall the one you don't use.
Please or to participate in this conversation.