э невеликий скріпт
котрий
SELECT image from product
file get_content CURL
translit
file_put_content
UPDATE product
$sql ="SELECT product_id, image FROM " . DB_PREFIX . "product";
$result = $this->db->query($sql);
foreach ($result->rows as $p) {
$curl = curl_init('Адрес Сайта/image/' . rawurlencode($p['image']));
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FORBID_REUSE, 1);
curl_setopt($curl, CURLOPT_FRESH_CONNECT, 1);
$response = curl_exec($curl);
$file_name = strtolower($this->translit(str_replace('data/', '',$p['image'])));
$directories = explode('/', dirname($file_name));
$path = '';
foreach ($directories as $directory) {
$path = $path . '/' . $directory;
if (!is_dir(DIR_IMAGE . 'catalog/' . $path)) {
@mkdir(DIR_IMAGE . 'catalog/' . $path, 0777);
}
}
file_put_contents(DIR_IMAGE . 'catalog/' . $file_name, $response);
var_dump($file_name, $p['product_id']);
$this->db->query("UPDATE " . DB_PREFIX . "product
SET `image` = '" . $this->db->escape('catalog/' . $file_name) . "'
WHERE `product_id` = " . (int)$p['product_id']);
код не далек от совершенства, но 10гиг фото пробежал