You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use a custom optimizer and register this optimizer in the config media-library.image_optimizers.
Since the major 11 upgrade, the custom optimizer does not get called at all. If I add logs to the canHandle and getCommand function, nothing happens. If I downgrade, it works again, without changing anything else.
I debugged the problem a bit, and it looks to me like the problem is somewhere here:
The laravel-medialibrary only uses the image_optimizers config here to create the OptimizerChainFactory:
I use a custom optimizer and register this optimizer in the config
media-library.image_optimizers
.Since the major 11 upgrade, the custom optimizer does not get called at all. If I add logs to the
canHandle
andgetCommand
function, nothing happens. If I downgrade, it works again, without changing anything else.I debugged the problem a bit, and it looks to me like the problem is somewhere here:
The
laravel-medialibrary
only uses theimage_optimizers
config here to create theOptimizerChainFactory
:laravel-medialibrary/src/Conversions/Conversion.php
Line 40 in 3bb61ae
In the OptimizerChainFactory (https://github.com/spatie/image-optimizer/blob/02e2717c31334646f00a0e25cf5edbf41bd20ac3/src/OptimizerChainFactory.php#L15) the
$config
is being used, but it ignores custom optimizers, since the optimizers are redefined here. (https://github.com/spatie/image-optimizer/blob/02e2717c31334646f00a0e25cf5edbf41bd20ac3/src/OptimizerChainFactory.php#L35)The text was updated successfully, but these errors were encountered: