batch()->cancelled()) { return; } $encoded = InterventionImage::read($this->tmpFile)->toAvif(config('gallery.image.quality', 80)); Storage::disk('images')->put("{$this->image->album->id}/original/{$this->image->id}.avif", $encoded); } public function failed(?Throwable $exception): void { Log::error($exception, ['image' => $this->image, 'tmpFile' => $this->tmpFile]); $this->image->delete(); } }