allow nil in image template type