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

unable to tweet image #18

Open
edsu opened this issue Jan 18, 2017 · 1 comment
Open

unable to tweet image #18

edsu opened this issue Jan 18, 2017 · 1 comment

Comments

@edsu
Copy link
Member

edsu commented Jan 18, 2017

I think images may need to be resized, sometimes they fail like this:

2017-01-18 07:39:22,299 - root - ERROR - unable to tweet: [{'message': 'Image dimensions must be >= 4x4 and <= 8192x8192', 'code': 324}]
@hugovk
Copy link
Contributor

hugovk commented Feb 28, 2018

Here's one way, maintain aspect ratio with 8192x8192 max resolution:

pip3 install pillow
from PIL import Image
im = Image.open(filename)
im.thumbnail((8192, 8192))
im.save(filename)

https://pillow.readthedocs.io/en/latest/reference/Image.html#examples

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

No branches or pull requests

2 participants