-
Notifications
You must be signed in to change notification settings - Fork 12
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
media too large #76
Comments
"Media uploads for images are limited to 5MB in file size, and for videos are limited to 15MB. For chunked uploads, the maximum chunk size is 5MB." -- https://dev.twitter.com/rest/reference/post/media/upload So macaw might be over the limit if it's sending base64 |
The wording of On 08/19/15 15:50, Ralph Giles wrote:
|
Yes, I think you're right. Presumedly that's per-image. Maybe 5MB < 4.4MB because of inconsistent units? |
On 08/19/15 15:57, Ralph Giles wrote:
I suspect that twitter wants the client to resize the image before |
I suppose you can draw it into a hidden canvas element? How does the thumbnailing work? https://hacks.mozilla.org/2011/01/how-to-develop-a-html5-image-uploader/ canvas.toBlob() looks like the most efficient interface for getting the new jpeg data for upload. |
That is basically what the thumbnail does. That is a possibility but it
|
Media in my timeline on the website is all scaled to 600px width. So if you downsample to 1280 (or even 1920) as a maximum dimension it should be considerably smaller that 5MB as a jpeg and still display with reasonable quality. Maybe do a loop to explore a few options. Try converting png to png, jpeg to jpeg. If the result is too large (Blob.size) try again with a lower jpeg quality, or with jpeg instead of png, or halve the dimensions. |
I tried sharing a photo from the Firefox OS gallery app, but the post fails with
Error: one or more of the uploaded media is too large.
This is on a Sony Z3c, so it's a 4.4 MB 3936x5248 pixel image.
Doesn't happen with the twitter.com website it with the twidere android client on the same hardware.
Does twitter require downsampling the image?
The text was updated successfully, but these errors were encountered: