YouTip LogoYouTip

Php Image Type To Mime Type

# PHP image_type_to_mime_type - Returns the MIME Type of an Image [![Image 3: PHP Image Processing](#)PHP Image Processing](#) image2wbmp β€” Gets the MIME type of the image type returned by getimagesize, exif_read_data, exif_thumbnail, and exif_imagetype. ### Syntax string image_type_to_mime_type ( int $imagetype ) The image_type_to_mime_type() function can determine the MIME type of an IMAGETYPE constant. ### Example ### Return values are as follows: | Image Type (`imagetype`) | Return Value | | --- | --- | | **`IMAGETYPE_GIF`** | _image/gif_ | | **`IMAGETYPE_JPEG`** | _image/jpeg_ | | **`IMAGETYPE_PNG`** | _image/png_ | | **`IMAGETYPE_SWF`** | _application/x-shockwave-flash_ | | **`IMAGETYPE_PSD`** | _image/psd_ | | **`IMAGETYPE_BMP`** | _image/bmp_ | | **`IMAGETYPE_TIFF_II`** (intel byte order) | _image/tiff_ | | **`IMAGETYPE_TIFF_MM`** (motorola byte order) | _image/tiff_ | | **`IMAGETYPE_JPC`** | _application/octet-stream_ | | **`IMAGETYPE_JP2`** | _image/jp2_ | | **`IMAGETYPE_JPX`** | _application/octet-stream_ | | **`IMAGETYPE_JB2`** | _application/octet-stream_ | | **`IMAGETYPE_SWC`** | _application/x-shockwave-flash_ | | **`IMAGETYPE_IFF`** | _image/iff_ | | **`IMAGETYPE_WBMP`** | _image/vnd.wap.wbmp_ | | **`IMAGETYPE_XBM`** | _image/xbm_ | [![Image 4: PHP Image Processing](#)PHP Image Processing](#)
← Php Image2WbmpPhp Getimagesizefromstring β†’