load image implementation