Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create thumbnail from files saved with wrong extension #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidebianchi03
Copy link

If a png file has been saved with wrong extension (example: the png image has been saved with .jpg) the following error will be throw OSError: cannot write mode RGBA as JPEG django thumbnail. With Pillow you can get the image format from the file content and not just reading file extension.

In this zip archive there are the original png image and the same image but with wrong extension
wrong_jpg.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant