Method GetMimeType
GetMimeType(string)
Resolves a file extension to the MIME type of the image format it belongs to.
public static string GetMimeType(string extension)
Parameters
extensionstringThe extension to resolve, with or without the leading dot, any casing (for example
".png","JPEG").
Returns
- string
The MIME type (for example
image/png), ornullwhen the extension does not belong to a known image format.