protected static function getTempFile($type = "") { $file = PIMCORE_SYSTEM_TEMP_DIRECTORY . "/image-optimize-" . uniqid(); if ($type) { $file .= "." . $type; } return $file; }