code to load an image