| | |
| | | * |
| | | * Generates artist feature cards as webp images with artist information |
| | | * Uses Imagick with GD fallback and leverages FileUploadManager storage |
| | | * TODO: Integrate better with UploadManager.php |
| | | */ |
| | | class ImageGenerator |
| | | { |
| | |
| | | |
| | | // Get directory structure from FileUploadManager if available |
| | | if ($this->fileManager) { |
| | | $user_dir = $this->fileManager->getUploadDirectory(); |
| | | $user_dir = $this->fileManager->generateDirectory('image', $this->data); |
| | | $relative_dir = str_replace($base_dir, '', dirname($file_path)); |
| | | $destination_dir = $base_dir . '/' . $relative_dir; |
| | | } else { |
| | |
| | | $user_data = get_userdata($this->data['user_id']); |
| | | $this->outputFilename = $this->fileManager->generateFilename( |
| | | $title.'.webp', |
| | | $user_data |
| | | $this->data |
| | | ); |
| | | } else { |
| | | // Fallback filename generation |