Here we take the extension from the exif data (exposed by PIL), not from the file name; we do not trust the extensions which come from the filer, since in filer there is no validation on the file extension <=> you can have a filer image instance called "something.txt".