spatie medialibrary defining fallback image for each convertion

578 views Asked by At

with spatie/medialibrary package i have 3 conversions in registerMediaConversions method like this

public function registerMediaConversions(Media $media = null): void
{
    $this->addMediaConversion('thumb')
        ->fit(MANIPULATIONS::FIT_STRETCH, 140, 260);

    $this->addMediaConversion('slider')
        ->fit(MANIPULATIONS::FIT_STRETCH, 275, 720);

    $this->addMediaConversion('mini')
        ->fit(MANIPULATIONS::FIT_STRETCH, 55, 85);
}

the thing i want is that i can define a useFallbackUrl image for each of these conversions. i know i can define fallback image on registerMediaCollections method, but this will apply on every conversion, instead i want to define a different fallback image for each one of them. how can i do that?

0

There are 0 answers