Verifies whether an image file is valid.
isImageFile(value)
→ returns boolean
If the local file path is for an image, write the image to the browser
<cfset myImage = expandPath("./sample.png")>
<cfif isImageFile(myImage)>
<cfimage action="writeToBrowser" source="#myImage#">
</cfif>
Output whether the online file is an image
isImageFile("https://cfdocs.org/apple-touch-icon.png");
Expected Result: true
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.