change cos_loader to output an image file instead of load a component