wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_is_heic_image_mime_type › WordPress Function

Since6.7.0
Deprecatedn/a
wp_is_heic_image_mime_type ( $mime_type )
Parameters:
  • (string) $mime_type The mime type to check.
    Required: Yes
Returns:
  • (bool) Whether the mime type is for a HEIC/HEIF image.
Defined at:
Codex:

Checks if a 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 );
}