only re-create image template if necessary