use mime_content_type instead of getimagesize