use $REX['IMAGE_EXTENSIONS']