wp_is_heic_image_mime_type( string $mime_type ): bool

In this article

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

Parameters

$mime_typestringrequired
The mime type to check.

Return

bool Whether the mime type is for a HEIC/HEIF image.

Source

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 );
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.