webCOMAND

#IMAGE GetExtension

Get the file extension typically used to indicate the format of a file that contains the image bytes.

Prototype

#IMAGE($image_bytes, GetExtension)

Return

A string with the typically three character file extension, such as "gif", "jpg", "png".

Example

#/ get the file extension based on the image format
#NEW($ext)#IMAGE($img,GetExtension)#ENDNEW
<img src="#OUTPUT('thumbnail.$ext',$img)" />