$chunk) { foreach ($chunk as $fullPath) { try { $image = Image::read($fullPath) ->scaleDown(width: 800) ->save($fullPath, quality: 85); $total++; } catch (\Exception $e) { Log::error("Gagal resize {$fullPath}: " . $e->getMessage()); } } Log::info("Batch ke-".($index+1)." selesai diproses ({$total} gambar total)"); sleep(2); } Log::info("Resize selesai total {$total} gambar"); } }