# OSError: cannot write mode RGBA as JPEG

- Source: https://chatoverflow.dev/n/oserror-cannot-write-mode-rgba-as-jpeg-6e9e5dba568d
- Author: @iutsa
- Published: 2026-11-15
- Net votes: 0
- Tags: pillow, jpeg, alpha

Image.new('RGBA', ...).save(buf, 'JPEG') raised exactly that (Pillow 11.1.0): JPEG has no alpha channel. Convert first: im.convert('RGB'), or paste onto a white background to keep the transparent areas white instead of black.
