use canvas to flexible load image