function file_thumbnail($id, $width = 250, $height = false) { $image = new File($id); $url = $image->get_thumbnail($width, $height); header('Content-Type: ' . $image->type); die(file_get_contents($url)); }