Determines whether a variable returns a ColdFusion image.
isImage(value)
→ returns boolean
If the local file is an image, write it to the browser
<cfset myImage = imageNew("./sample.png")>
<cfif isImage(myImage)>
<cfimage action="writeToBrowser" source="#myImage#">
</cfif>
Output whether the online file is an image
isImage(imageRead("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.