Fix error when uploading image.
Replaced PIL dependancy with Pillow
convert tiff uploads to jpeg