Method GetExtension
GetExtension(string)
Resolves a MIME type to the canonical file extension of the image format it identifies.
public static string GetExtension(string mimeType)
Parameters
mimeTypestringThe MIME type to resolve, any casing; accepted aliases resolve too (for example
image/heifresolves alongsideimage/heic).
Returns
- string
The canonical extension, lowercase and dot-prefixed (for example
".jpg"forimage/jpeg), ornullwhen the MIME type does not identify a known image format.