-
Since this is a "media" library, it's better support all kind of media, not only images. We have ImageGenerators, then we can have PdfGenerators, VideoGenerators, AudioGenerators etc. Then I would like to define multiple conversions and specify which generator to use. // To generate thumbnail conversions.
$this->addMediaConversion('thumb')
->usingGenerator('image') // which will be default
->width(200)
->height(200);
// To generate pdf conversions.
$this->addMediaConversion('pdf')
->usingGenerator('pdf'); So the uploaded file will have both thumbnail and pdf conversions ready to use. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can already define generators which can determine themselves if they should be used. |
Beta Was this translation helpful? Give feedback.
-
@freekmurze I think you get me wrong. I want to generate anything else. For example I would upload a MP4 file and generate an MP3 from it. That's why I said "generator TYPE definition" at the first place. |
Beta Was this translation helpful? Give feedback.
-
Hey @bcalik I'm having the same issue and would like to know with which solution you have ended up What I'm doing right now is pre-processing videos before uploading them |
Beta Was this translation helpful? Give feedback.
@freekmurze I think you get me wrong.
I already know I can define custom generators, but they are image generators.
Image generators are for to generate images. But I don't want to generate images.
I want to generate anything else.
For example I would upload a MP4 file and generate an MP3 from it.
That would be called AudioGenerator, with type "audio", not "image".
That's why I said "generator TYPE definition" at the first place.