replacing template image using real image