support image path substitution