wp_is_heic_image_mime_type()WP 6.7.0

Checks if a mime type is for a HEIC/HEIF image.

No Hooks.

Returns

true|false. Whether the mime type is for a HEIC/HEIF image.

Usage

wp_is_heic_image_mime_type( $mime_type );
$mime_type(string) (required)
The mime type to check.

Changelog

Since 6.7.0 Introduced.

wp_is_heic_image_mime_type() code WP 6.8.1

function wp_is_heic_image_mime_type( $mime_type ) {
	$heic_mime_types = array(
		'image/heic',
		'image/heif',
		'image/heic-sequence',
		'image/heif-sequence',
	);

	return in_array( $mime_type, $heic_mime_types, true );
}