print_r($image_list);
// copy images from whatever they are (if this is in a docker container they may be mounted somewhere)
-foreach ($image_list as $image) {
- copy(SRC_PATH . $image['path'], BASE_PATH_TEMP . "/assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION));
+foreach ($image_list as $key => $image) {
+ $old_path = SRC_PATH . $image['path'];
+ $new_path = BASE_PATH_TEMP . "/assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION);
+ copy($old_path, $new_path);
+
+ $image_list[$key]['path'] = "../assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION);
}
// create partials: