-
Notifications
You must be signed in to change notification settings - Fork 52
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
publish to Twitter: if a photo size>5MB, shrink before posting #710
Comments
interesting idea! thanks for filing. resizing automatically seems like a minor liberty, but probably fine as long as we clearly document when and how it happens. sounds like there's also some uncertainty around how Twitter handles animated gifs in particular? i guess that's orthogonal though. never mind! the actual resizing would be straightforward, using either PIL or app engine's API: https://cloud.google.com/appengine/docs/python/images/ |
re animated gifs, looks like they have extra limits on frames, etc: https://dev.twitter.com/rest/media/uploading-media.html#gifrecs ... but 5MB limit is the same: https://dev.twitter.com/rest/media/uploading-media.html#imagerecs except maybe the limit is actually 3MB, not 5MB? from the link above:
unfortunate, and confusing. @tantek this is begging for some empirical testing! eg can you POSSE a 4MB photo? :P |
related via @tantek: PNG compression:
|
Obsolete, Bridgy Twitter is dead. #1410 (comment) |
Just as Bridgy Publish automatically shortens (ellipses) text content when posting to Twitter, it would be nice if Bridgy Publish could also detect when a photo being posted was too big for Twitter and resize it to be just under 5MB* (and then link to the original post for the full resolution version).
*Twitter photos must be <=5MB according to this actual error from Bridgy Publish logs:
2016-12-02 01:43:34.244510 W Error 400, response body: {"errors":[{"code":..."message":"Image file size must be <= 5242880 bytes"}]}
Photo being attempted to publish:
https://indieweb.org/images/f/fc/2016-335-hwc-sf.gif
The text was updated successfully, but these errors were encountered: