We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you add option for customize adding media? Or just make public/protected method addMedia I want to prepare image before save:
addMedia
class MediaLibrary extends \VI\MoonShineSpatieMediaLibrary\Fields\MediaLibrary { public function addMedia(HasMedia $item, UploadedFile $file): Media { $filename = $file->getPath() . '/' . $item->slug . '.webp'; SpatieImage::load($file->getRealPath()) ->fit(Fit::Fill, 1920, 1080) ->optimize() ->save($filename); $item->addMedia($filename)->withResponsiveImages()->toMediaCollection(); } }
It is possible?
The text was updated successfully, but these errors were encountered:
You can use MediaConversions
Sorry, something went wrong.
No, i dont want store fat original file. Spatie says about it here spatie/laravel-medialibrary#3447 (comment) I want add already optimized file.
No branches or pull requests
Can you add option for customize adding media?
Or just make public/protected method
addMedia
I want to prepare image before save:
It is possible?
The text was updated successfully, but these errors were encountered: