<?php
-ob_clean();
-
list ($size, $imgpath) = explode('/', ltrim($Args, '/'), 2);
$imgpath = preg_replace('{^(?=[0-9]+/)}', 'data/', $imgpath, 1);
}
$cmd = implode(' ', array_map('escapeshellarg', [
'convert',
+ '-delete', '1--1',
'-trim',
'-background', 'white', '-layers', 'flatten',
'-resize', "${width}x${height}",