HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: graficav (1037)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/graficav/holatimbres.cl/install/fixtures/fashion/img/p/resize.php
<?php

include('../../../../../config/config.inc.php');
ini_set('max_execution_time', 7200);
ini_set('memory_limit', '512M');

$types = ImageType::getImagesTypes('products');
$files = scandir(dirname(__FILE__));
foreach ($files as $file) {
    if (preg_match('/^Fotolia_([0-9]+)_X\.jpg$/i', $file, $match)) {
        foreach ($types as $type) {
            if (!file_exists($match[1].'-'.$type['name'].'.jpg')) {
                ImageManager::resize($file, $match[1].'-'.$type['name'].'.jpg', $type['width'], $type['height'], 'jpg', true);
            }
        }
        //if (!file_exists($match[1].'.jpg'))
        {
            //copy($file, $match[1].'.jpg');
            ImageManager::resize($file, $match[1].'.jpg', 800, 800, 'jpg', true);
        }
    }
}