Has anyone noticed that the ConversionHasBeenCompleted event is not fired when the conversion is queued?
I have two media conversions:
$this->addMediaCollection('image')->withResponsiveImages();
$this->addMediaConversion('thumb')->width(300)->crop('crop-center', 300, 200)->nonQueued();
when I listen for the ConversionHasBeenCompleted completed event I catch the nonQueued event but not the withResponsiveImages();
here is the listener:
<?php
namespace App\Listeners;
use Spatie\MediaLibrary\Conversions\Events\ConversionHasBeenCompleted;
use Log;
class MediaConversionCompleteListener
{
public function __construct() {
}
public function handle(ConversionHasBeenCompleted $event): void {
$media = $event->media;
$path = $media->getPath();
$conversion = $event->conversion;
$conversionName = $conversion->getName();
Log::info("file {$path} has been converted using conversion:{$conversionName} for media {$media->id}");
}
}
And here is the log entries made when I ad some media:
[2024-07-24 14:52:43] local.INFO: file /Users/richard/PhpstormProjects/spa/storage/app/public/media/30/IMG_4840.HEIC has been saved for media 30
[2024-07-24 14:52:44] local.INFO: file /Users/richard/PhpstormProjects/spa/storage/app/public/media/30/IMG_4840.HEIC has been converted using conversion:thumb for media 30
Ideas?