load_image function. Wrapper class