Created utility function to load images as recommended by Buffalo.