isImageFile

Verifies whether an image file is valid.

isImageFile(path) → returns boolean

Argument Reference

path string
Required

Pathname to an image file.

Examples
Sample code invoking the isImageFile function

Check the file is image or not.

<cfset myImage  = expandPath("./sample.png")>
<cfif IsImageFile(myImage)>
	<cfimage action="writeToBrowser" source="#myImage#">
</cfif>

Fork me on GitHub