isImageFile

Verifies whether an image file is valid.

isImageFile(path) → returns boolean

isImageFile 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