Getting “cannot write mode P as JPEG” while operating on JPG image January 19, 2023 by Tarik You need to convert the image to RGB mode. Image.open('old.jpeg').convert('RGB').save('new.jpeg')