For whoever reaches here with the error colab PIL UnidentifiedImageError: cannot identify image file
in Google Colab, with a new PIL versions, and none of the previous solutions works for him:
Simply restart the environment, your installed PIL version is probably outdated.