Add the loadImage function