Added some new image template functions