'image/jpeg', 'png' => 'image/png', 'gif' => 'image/gif', default => null }; if (!$mime) die("Unsupported format."); ?>