Fix image update script to handle $image_type