TwidereProject / Twidere-Android

http://twidere.com
2.75k stars 377 forks source link

Tweets with larger images not sent #583

Open madduck opened 8 years ago

madduck commented 8 years ago

Most of the time I try to post a photo to Twitter, Twidere sends all the data but then toasts "Tweet not sent". I think it might be due to image size, but I can't know for sure. In any case, there is no option to downscale the image. Maybe this could be automated?

yamatt commented 8 years ago

Same issue here. I wasn't sure if it was larger images or all images.

MStrohmeier commented 8 years ago

I can confirm that images in excess of 3 MB will always fail, as per the Twitter media guidelines (Tweet creation requires images to be <= 3 MB). Twidere seems to attempt uploading anyway and reports the "Tweet not sent" error only after the server rejects the submission, rather than checking file size before trying to tweet. Native resizing would be nice, though even a warning about the oversized image would be preferable to wasting bandwidth on an upload the server will never accept.

ilf commented 8 years ago

+1. Resizing images to under 3MB makes it work again, but that's really unintuitive.

yamatt commented 8 years ago

At the very least it needs a better error. Ideally it'll resize the image to 90-50% to get it to <3MB, although I can understand that that may not be a simple task.

Natureshadow commented 8 years ago

I am trying to post a 2.24 MiB image and get the same errors.

Do the 3 MiB count after base64 encoding or something?

Natureshadow commented 8 years ago

Reduced to 1.03 MiB, still no luck and no helpful error message.

twig commented 8 years ago

Came here to create the same issue.

Photo I tried to attach was larger than 3mb. Twidere kept saying tweet could not be sent so I assumed it was an issue with the client. When I tried it on tweetdeck it gave me the 3mb error message, so that should be conveyed on Twidere as well to avoid confusion.

wxcafe commented 8 years ago

I have this same issue, my phone always takes pictures that are >3MB and thus I can't directly post pictures to twitter with twidere. My opinion is that it should either allow cropping or reducing quality of the image before sending when it's >3MB.

Natureshadow commented 8 years ago

I found out that I can send JPEG photos of any size, but cannot send any PNG images.

ilf commented 8 years ago

I can't verify that, Natureshadow. All my images in /sdcard/DCIM/Camera are JPEG, but the ones over 3 MB result in this error.

Natureshadow commented 8 years ago

@ilf, can you send PNG images?

RenaKunisaki commented 8 years ago

Just started using Twidere (got the latest release from Github a few minutes ago), seems to be same problem, except the response is "Error 400". Sending smaller images works. (Maybe API rate limit? I'm using the default key right now.)

Related: is there a limit to how many images can be attached to one tweet? It seems to accept any number (but the ones I tried were too large). And is 3MB limit per image, per tweet, or something else?

wxcafe commented 8 years ago

It's apparently not API rate limit, since I get the same error for >3MB images with an unlimited API key. The limit is 4 I think, at least that's the limit on the web client and on Tweetdeck (which is a Twitter product). 3MB seems to be the limit per image .

This article https://support.twitter.com/articles/20156423 on their FAQ seems to suggest that it is indeed 4 images per tweet, but also suggests that you can upload images up to 5MB, which is pretty obviously not true from what we can see here. Tweetdeck also refuses to upload images over 3MB and displays a message specifically talking about 3MB

noodlecollie commented 8 years ago

I've been having the same issue for a couple of months now. Images used to send fine once upon a time but after the last update nothing goes through at all. I had to reinstall the official Twitter app (eww) to be able to send photos.

tarocco commented 7 years ago

Still unable to send tweets with images.

ilf commented 7 years ago

Works for me, in 3.2.7.

RenaKunisaki commented 7 years ago

I've had no problem sending tweets with up to 3 images as long as I resize them to 1024 pixels wide first. (No doubt the actual limit is file size, not dimension, but this seems to do the trick.)

PhoenixAlx commented 7 years ago

I had have the same problem. With twicca not.

PolynomialDivision commented 6 years ago

I'm getting Status Code 200 back from the server? (means OK) But same problem...

punkscience commented 6 years ago

This happens for me on a Pixel 2 out of the box. If you go through the normal flow of tweeting and then select to take a photo, the native image quality is so high that the image gets rejected due to excessive image size (403, I believe). Twidere should automatically down-scale to < the limit before. I am guessing that's how the Twitter client must handle it.

erik78 commented 6 years ago

I use Version 3.7.3 on android an Friendica Server as backend. I cant upload picture taken from my camera. Uploads failed. An inapp rescaling function should be nice...

kr428 commented 4 years ago

Subscribed myself as I see this once in a while in recent Twidere versions as well. It seems the "stock" Twitter app does rescale images (as well as discarding some EXIF metadata which seems a good thing). This really would be helpul in Twidere too, and be it optional.