change write_images to write_assets