add function to create image files