import image optionally from PIL package