true, 'directOutput' => true)); $getFile = admFuncVariableIsValid($_GET, 'file', 'file', array('requireValue' => true, 'directOutput' => true)); // Initialize locale parameters $imageServerPath = ADMIDIO_PATH . FOLDER_DATA . '/' . $getModule . '/images/' . $getFile; // check if image exists if (!is_file($imageServerPath)) { http_response_code(404); exit(); } $image = new Image($imageServerPath); header('Content-Type: ' . $image->getMimeType()); $image->copyToBrowser(); $image->delete();