WordPress at a glance
function is not described

WP_Image_Editor_GD::supports_mime_type() public WP 3.5.0

Checks to see if editor supports the mime-type specified.

{} It's a method of the class: WP_Image_Editor_GD{}

No Hooks.

Return

true/false.

Usage

$result = WP_Image_Editor_GD::supports_mime_type( $mime_type );
$mime_type(string) (required)

Changelog

Since 3.5.0 Introduced.

Code of WP_Image_Editor_GD::supports_mime_type() WP 5.5.1

<?php
public static function supports_mime_type( $mime_type ) {
	$image_types = imagetypes();
	switch ( $mime_type ) {
		case 'image/jpeg':
			return ( $image_types & IMG_JPG ) != 0;
		case 'image/png':
			return ( $image_types & IMG_PNG ) != 0;
		case 'image/gif':
			return ( $image_types & IMG_GIF ) != 0;
	}

	return false;
}