MIME_TYPE_IS_IMAGE

Filename is image

Description

Returns true if the given MIME type belongs to a web-safe image format, and false otherwise.

Function signature

MIME_TYPE_IS_IMAGE(mimetype: String) => Boolean

Parameter

Description

MIME type

MIME type

Examples

Formula

Return value

MIME_TYPE_IS_IMAGE("image/apng")

true

MIME_TYPE_IS_IMAGE("image/png")

true

MIME_TYPE_IS_IMAGE("image/svg+xml")

true

MIME_TYPE_IS_IMAGE("video/mp4")

false

MIME_TYPE_IS_IMAGE("wrong MIME type")

false