Skip to content

Instantly share code, notes, and snippets.

@SpyWSamara
SpyWSamara / convert.php
Created May 24, 2019 11:49
Convert bitrix resize_cache to webp
<?php
use Bitrix\Main\Diag\Debug;
Debug::startTimeLabel('convert');
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(\Bitrix\main\Application::getDocumentRoot().'/upload/resize_cache'));
$files = [];
foreach ($iterator as $entity) {
if ($entity->isDir()) {