public function executeOptimize($command, $file = '') { $command = escapeshellcmd($command); $r = shell_exec($command); if ($this->getSetting('logOptimizations')) { ImagerPlugin::log("Optimized image {$file} \n\n" . $r, LogLevel::Info, true); } }